Termination of the given ITRSProblem could not be shown:



ITRS
  ↳ ITRStoQTRSProof

ITRS problem:
The following domains are used:

z

The TRS R consists of the following rules:

if(FALSE, u, v) → v
minusNat(TRUE, x, y) → minus(x, round(x))
if(TRUE, u, v) → u
minus(x, y) → minusNat(&&(>=@z(y, 0@z), =@z(x, +@z(y, 1@z))), x, y)
round(x) → if(=@z(%@z(x, 2@z), 0@z), x, +@z(x, 1@z))

The set Q consists of the following terms:

if(FALSE, x0, x1)
minusNat(TRUE, x0, x1)
if(TRUE, x0, x1)
minus(x0, x1)
round(x0)


Represented integers and predefined function symbols by Terms

↳ ITRS
  ↳ ITRStoQTRSProof
QTRS
      ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

if(false, u, v) → v
minusNat(true, x, y) → minus(x, round(x))
if(true, u, v) → u
minus(x, y) → minusNat(and(greatereq_int(y, pos(0)), equal_int(x, plus_int(pos(s(0)), y))), x, y)
round(x) → if(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x))
and(false, false) → false
and(false, true) → false
and(true, false) → false
and(true, true) → true
greatereq_int(pos(x), pos(0)) → true
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(0), neg(y)) → true
greatereq_int(pos(x), neg(y)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(neg(x), pos(s(y))) → false
greatereq_int(neg(s(x)), pos(0)) → false
greatereq_int(neg(s(x)), neg(0)) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
greatereq_int(neg(s(x)), neg(s(y))) → greatereq_int(neg(x), neg(y))
equal_int(pos(0), pos(0)) → true
equal_int(neg(0), pos(0)) → true
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), pos(0)) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(neg(x), pos(y)) → minus_nat(y, x)
plus_int(neg(x), neg(y)) → neg(plus_nat(x, y))
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(pos(x), neg(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
mod_int(neg(x), neg(y)) → neg(mod_nat(x, y))
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if1(true, x, y) → x
if1(false, x, y) → y
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)

The set Q consists of the following terms:

if(false, x0, x1)
minusNat(true, x0, x1)
if(true, x0, x1)
minus(x0, x1)
round(x0)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))


Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

MINUSNAT(true, x, y) → MINUS(x, round(x))
MINUSNAT(true, x, y) → ROUND(x)
MINUS(x, y) → MINUSNAT(and(greatereq_int(y, pos(0)), equal_int(x, plus_int(pos(s(0)), y))), x, y)
MINUS(x, y) → AND(greatereq_int(y, pos(0)), equal_int(x, plus_int(pos(s(0)), y)))
MINUS(x, y) → GREATEREQ_INT(y, pos(0))
MINUS(x, y) → EQUAL_INT(x, plus_int(pos(s(0)), y))
MINUS(x, y) → PLUS_INT(pos(s(0)), y)
ROUND(x) → IF(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x))
ROUND(x) → EQUAL_INT(mod_int(x, pos(s(s(0)))), pos(0))
ROUND(x) → MOD_INT(x, pos(s(s(0))))
ROUND(x) → PLUS_INT(pos(s(0)), x)
GREATEREQ_INT(pos(s(x)), pos(s(y))) → GREATEREQ_INT(pos(x), pos(y))
GREATEREQ_INT(neg(s(x)), neg(s(y))) → GREATEREQ_INT(neg(x), neg(y))
EQUAL_INT(pos(s(x)), pos(s(y))) → EQUAL_INT(pos(x), pos(y))
EQUAL_INT(neg(s(x)), neg(s(y))) → EQUAL_INT(neg(x), neg(y))
PLUS_INT(pos(x), neg(y)) → MINUS_NAT(x, y)
PLUS_INT(neg(x), pos(y)) → MINUS_NAT(y, x)
PLUS_INT(neg(x), neg(y)) → PLUS_NAT(x, y)
PLUS_INT(pos(x), pos(y)) → PLUS_NAT(x, y)
PLUS_NAT(s(x), y) → PLUS_NAT(x, y)
MINUS_NAT(s(x), s(y)) → MINUS_NAT(x, y)
MOD_INT(pos(x), pos(y)) → MOD_NAT(x, y)
MOD_INT(pos(x), neg(y)) → MOD_NAT(x, y)
MOD_INT(neg(x), pos(y)) → MOD_NAT(x, y)
MOD_INT(neg(x), neg(y)) → MOD_NAT(x, y)
MOD_NAT(s(x), s(y)) → IF1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
MOD_NAT(s(x), s(y)) → GREATEREQ_INT(pos(x), pos(y))
MOD_NAT(s(x), s(y)) → MOD_NAT(minus_nat_s(x, y), s(y))
MOD_NAT(s(x), s(y)) → MINUS_NAT_S(x, y)
MINUS_NAT_S(s(x), s(y)) → MINUS_NAT_S(x, y)

The TRS R consists of the following rules:

if(false, u, v) → v
minusNat(true, x, y) → minus(x, round(x))
if(true, u, v) → u
minus(x, y) → minusNat(and(greatereq_int(y, pos(0)), equal_int(x, plus_int(pos(s(0)), y))), x, y)
round(x) → if(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x))
and(false, false) → false
and(false, true) → false
and(true, false) → false
and(true, true) → true
greatereq_int(pos(x), pos(0)) → true
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(0), neg(y)) → true
greatereq_int(pos(x), neg(y)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(neg(x), pos(s(y))) → false
greatereq_int(neg(s(x)), pos(0)) → false
greatereq_int(neg(s(x)), neg(0)) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
greatereq_int(neg(s(x)), neg(s(y))) → greatereq_int(neg(x), neg(y))
equal_int(pos(0), pos(0)) → true
equal_int(neg(0), pos(0)) → true
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), pos(0)) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(neg(x), pos(y)) → minus_nat(y, x)
plus_int(neg(x), neg(y)) → neg(plus_nat(x, y))
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(pos(x), neg(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
mod_int(neg(x), neg(y)) → neg(mod_nat(x, y))
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if1(true, x, y) → x
if1(false, x, y) → y
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)

The set Q consists of the following terms:

if(false, x0, x1)
minusNat(true, x0, x1)
if(true, x0, x1)
minus(x0, x1)
round(x0)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
QDP
          ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MINUSNAT(true, x, y) → MINUS(x, round(x))
MINUSNAT(true, x, y) → ROUND(x)
MINUS(x, y) → MINUSNAT(and(greatereq_int(y, pos(0)), equal_int(x, plus_int(pos(s(0)), y))), x, y)
MINUS(x, y) → AND(greatereq_int(y, pos(0)), equal_int(x, plus_int(pos(s(0)), y)))
MINUS(x, y) → GREATEREQ_INT(y, pos(0))
MINUS(x, y) → EQUAL_INT(x, plus_int(pos(s(0)), y))
MINUS(x, y) → PLUS_INT(pos(s(0)), y)
ROUND(x) → IF(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x))
ROUND(x) → EQUAL_INT(mod_int(x, pos(s(s(0)))), pos(0))
ROUND(x) → MOD_INT(x, pos(s(s(0))))
ROUND(x) → PLUS_INT(pos(s(0)), x)
GREATEREQ_INT(pos(s(x)), pos(s(y))) → GREATEREQ_INT(pos(x), pos(y))
GREATEREQ_INT(neg(s(x)), neg(s(y))) → GREATEREQ_INT(neg(x), neg(y))
EQUAL_INT(pos(s(x)), pos(s(y))) → EQUAL_INT(pos(x), pos(y))
EQUAL_INT(neg(s(x)), neg(s(y))) → EQUAL_INT(neg(x), neg(y))
PLUS_INT(pos(x), neg(y)) → MINUS_NAT(x, y)
PLUS_INT(neg(x), pos(y)) → MINUS_NAT(y, x)
PLUS_INT(neg(x), neg(y)) → PLUS_NAT(x, y)
PLUS_INT(pos(x), pos(y)) → PLUS_NAT(x, y)
PLUS_NAT(s(x), y) → PLUS_NAT(x, y)
MINUS_NAT(s(x), s(y)) → MINUS_NAT(x, y)
MOD_INT(pos(x), pos(y)) → MOD_NAT(x, y)
MOD_INT(pos(x), neg(y)) → MOD_NAT(x, y)
MOD_INT(neg(x), pos(y)) → MOD_NAT(x, y)
MOD_INT(neg(x), neg(y)) → MOD_NAT(x, y)
MOD_NAT(s(x), s(y)) → IF1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
MOD_NAT(s(x), s(y)) → GREATEREQ_INT(pos(x), pos(y))
MOD_NAT(s(x), s(y)) → MOD_NAT(minus_nat_s(x, y), s(y))
MOD_NAT(s(x), s(y)) → MINUS_NAT_S(x, y)
MINUS_NAT_S(s(x), s(y)) → MINUS_NAT_S(x, y)

The TRS R consists of the following rules:

if(false, u, v) → v
minusNat(true, x, y) → minus(x, round(x))
if(true, u, v) → u
minus(x, y) → minusNat(and(greatereq_int(y, pos(0)), equal_int(x, plus_int(pos(s(0)), y))), x, y)
round(x) → if(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x))
and(false, false) → false
and(false, true) → false
and(true, false) → false
and(true, true) → true
greatereq_int(pos(x), pos(0)) → true
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(0), neg(y)) → true
greatereq_int(pos(x), neg(y)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(neg(x), pos(s(y))) → false
greatereq_int(neg(s(x)), pos(0)) → false
greatereq_int(neg(s(x)), neg(0)) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
greatereq_int(neg(s(x)), neg(s(y))) → greatereq_int(neg(x), neg(y))
equal_int(pos(0), pos(0)) → true
equal_int(neg(0), pos(0)) → true
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), pos(0)) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(neg(x), pos(y)) → minus_nat(y, x)
plus_int(neg(x), neg(y)) → neg(plus_nat(x, y))
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(pos(x), neg(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
mod_int(neg(x), neg(y)) → neg(mod_nat(x, y))
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if1(true, x, y) → x
if1(false, x, y) → y
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)

The set Q consists of the following terms:

if(false, x0, x1)
minusNat(true, x0, x1)
if(true, x0, x1)
minus(x0, x1)
round(x0)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 9 SCCs with 20 less nodes.

↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
QDP
                ↳ UsableRulesProof
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

MINUS_NAT_S(s(x), s(y)) → MINUS_NAT_S(x, y)

The TRS R consists of the following rules:

if(false, u, v) → v
minusNat(true, x, y) → minus(x, round(x))
if(true, u, v) → u
minus(x, y) → minusNat(and(greatereq_int(y, pos(0)), equal_int(x, plus_int(pos(s(0)), y))), x, y)
round(x) → if(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x))
and(false, false) → false
and(false, true) → false
and(true, false) → false
and(true, true) → true
greatereq_int(pos(x), pos(0)) → true
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(0), neg(y)) → true
greatereq_int(pos(x), neg(y)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(neg(x), pos(s(y))) → false
greatereq_int(neg(s(x)), pos(0)) → false
greatereq_int(neg(s(x)), neg(0)) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
greatereq_int(neg(s(x)), neg(s(y))) → greatereq_int(neg(x), neg(y))
equal_int(pos(0), pos(0)) → true
equal_int(neg(0), pos(0)) → true
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), pos(0)) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(neg(x), pos(y)) → minus_nat(y, x)
plus_int(neg(x), neg(y)) → neg(plus_nat(x, y))
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(pos(x), neg(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
mod_int(neg(x), neg(y)) → neg(mod_nat(x, y))
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if1(true, x, y) → x
if1(false, x, y) → y
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)

The set Q consists of the following terms:

if(false, x0, x1)
minusNat(true, x0, x1)
if(true, x0, x1)
minus(x0, x1)
round(x0)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QReductionProof
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

MINUS_NAT_S(s(x), s(y)) → MINUS_NAT_S(x, y)

R is empty.
The set Q consists of the following terms:

if(false, x0, x1)
minusNat(true, x0, x1)
if(true, x0, x1)
minus(x0, x1)
round(x0)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

if(false, x0, x1)
minusNat(true, x0, x1)
if(true, x0, x1)
minus(x0, x1)
round(x0)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

MINUS_NAT_S(s(x), s(y)) → MINUS_NAT_S(x, y)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
QDP
                ↳ UsableRulesProof
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

MINUS_NAT(s(x), s(y)) → MINUS_NAT(x, y)

The TRS R consists of the following rules:

if(false, u, v) → v
minusNat(true, x, y) → minus(x, round(x))
if(true, u, v) → u
minus(x, y) → minusNat(and(greatereq_int(y, pos(0)), equal_int(x, plus_int(pos(s(0)), y))), x, y)
round(x) → if(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x))
and(false, false) → false
and(false, true) → false
and(true, false) → false
and(true, true) → true
greatereq_int(pos(x), pos(0)) → true
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(0), neg(y)) → true
greatereq_int(pos(x), neg(y)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(neg(x), pos(s(y))) → false
greatereq_int(neg(s(x)), pos(0)) → false
greatereq_int(neg(s(x)), neg(0)) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
greatereq_int(neg(s(x)), neg(s(y))) → greatereq_int(neg(x), neg(y))
equal_int(pos(0), pos(0)) → true
equal_int(neg(0), pos(0)) → true
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), pos(0)) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(neg(x), pos(y)) → minus_nat(y, x)
plus_int(neg(x), neg(y)) → neg(plus_nat(x, y))
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(pos(x), neg(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
mod_int(neg(x), neg(y)) → neg(mod_nat(x, y))
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if1(true, x, y) → x
if1(false, x, y) → y
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)

The set Q consists of the following terms:

if(false, x0, x1)
minusNat(true, x0, x1)
if(true, x0, x1)
minus(x0, x1)
round(x0)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QReductionProof
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

MINUS_NAT(s(x), s(y)) → MINUS_NAT(x, y)

R is empty.
The set Q consists of the following terms:

if(false, x0, x1)
minusNat(true, x0, x1)
if(true, x0, x1)
minus(x0, x1)
round(x0)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

if(false, x0, x1)
minusNat(true, x0, x1)
if(true, x0, x1)
minus(x0, x1)
round(x0)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

MINUS_NAT(s(x), s(y)) → MINUS_NAT(x, y)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
QDP
                ↳ UsableRulesProof
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

PLUS_NAT(s(x), y) → PLUS_NAT(x, y)

The TRS R consists of the following rules:

if(false, u, v) → v
minusNat(true, x, y) → minus(x, round(x))
if(true, u, v) → u
minus(x, y) → minusNat(and(greatereq_int(y, pos(0)), equal_int(x, plus_int(pos(s(0)), y))), x, y)
round(x) → if(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x))
and(false, false) → false
and(false, true) → false
and(true, false) → false
and(true, true) → true
greatereq_int(pos(x), pos(0)) → true
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(0), neg(y)) → true
greatereq_int(pos(x), neg(y)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(neg(x), pos(s(y))) → false
greatereq_int(neg(s(x)), pos(0)) → false
greatereq_int(neg(s(x)), neg(0)) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
greatereq_int(neg(s(x)), neg(s(y))) → greatereq_int(neg(x), neg(y))
equal_int(pos(0), pos(0)) → true
equal_int(neg(0), pos(0)) → true
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), pos(0)) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(neg(x), pos(y)) → minus_nat(y, x)
plus_int(neg(x), neg(y)) → neg(plus_nat(x, y))
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(pos(x), neg(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
mod_int(neg(x), neg(y)) → neg(mod_nat(x, y))
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if1(true, x, y) → x
if1(false, x, y) → y
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)

The set Q consists of the following terms:

if(false, x0, x1)
minusNat(true, x0, x1)
if(true, x0, x1)
minus(x0, x1)
round(x0)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QReductionProof
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

PLUS_NAT(s(x), y) → PLUS_NAT(x, y)

R is empty.
The set Q consists of the following terms:

if(false, x0, x1)
minusNat(true, x0, x1)
if(true, x0, x1)
minus(x0, x1)
round(x0)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

if(false, x0, x1)
minusNat(true, x0, x1)
if(true, x0, x1)
minus(x0, x1)
round(x0)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

PLUS_NAT(s(x), y) → PLUS_NAT(x, y)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
QDP
                ↳ UsableRulesProof
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

EQUAL_INT(neg(s(x)), neg(s(y))) → EQUAL_INT(neg(x), neg(y))

The TRS R consists of the following rules:

if(false, u, v) → v
minusNat(true, x, y) → minus(x, round(x))
if(true, u, v) → u
minus(x, y) → minusNat(and(greatereq_int(y, pos(0)), equal_int(x, plus_int(pos(s(0)), y))), x, y)
round(x) → if(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x))
and(false, false) → false
and(false, true) → false
and(true, false) → false
and(true, true) → true
greatereq_int(pos(x), pos(0)) → true
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(0), neg(y)) → true
greatereq_int(pos(x), neg(y)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(neg(x), pos(s(y))) → false
greatereq_int(neg(s(x)), pos(0)) → false
greatereq_int(neg(s(x)), neg(0)) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
greatereq_int(neg(s(x)), neg(s(y))) → greatereq_int(neg(x), neg(y))
equal_int(pos(0), pos(0)) → true
equal_int(neg(0), pos(0)) → true
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), pos(0)) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(neg(x), pos(y)) → minus_nat(y, x)
plus_int(neg(x), neg(y)) → neg(plus_nat(x, y))
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(pos(x), neg(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
mod_int(neg(x), neg(y)) → neg(mod_nat(x, y))
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if1(true, x, y) → x
if1(false, x, y) → y
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)

The set Q consists of the following terms:

if(false, x0, x1)
minusNat(true, x0, x1)
if(true, x0, x1)
minus(x0, x1)
round(x0)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QReductionProof
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

EQUAL_INT(neg(s(x)), neg(s(y))) → EQUAL_INT(neg(x), neg(y))

R is empty.
The set Q consists of the following terms:

if(false, x0, x1)
minusNat(true, x0, x1)
if(true, x0, x1)
minus(x0, x1)
round(x0)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

if(false, x0, x1)
minusNat(true, x0, x1)
if(true, x0, x1)
minus(x0, x1)
round(x0)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
QDP
                        ↳ UsableRulesReductionPairsProof
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

EQUAL_INT(neg(s(x)), neg(s(y))) → EQUAL_INT(neg(x), neg(y))

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the usable rules with reduction pair processor [LPAR04] with a polynomial ordering [POLO], all dependency pairs and the corresponding usable rules [FROCOS05] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

The following dependency pairs can be deleted:

EQUAL_INT(neg(s(x)), neg(s(y))) → EQUAL_INT(neg(x), neg(y))
No rules are removed from R.

Used ordering: POLO with Polynomial interpretation [POLO]:

POL(EQUAL_INT(x1, x2)) = 2·x1 + x2   
POL(neg(x1)) = x1   
POL(s(x1)) = 2·x1   



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ UsableRulesReductionPairsProof
QDP
                            ↳ PisEmptyProof
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
P is empty.
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
QDP
                ↳ UsableRulesProof
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

EQUAL_INT(pos(s(x)), pos(s(y))) → EQUAL_INT(pos(x), pos(y))

The TRS R consists of the following rules:

if(false, u, v) → v
minusNat(true, x, y) → minus(x, round(x))
if(true, u, v) → u
minus(x, y) → minusNat(and(greatereq_int(y, pos(0)), equal_int(x, plus_int(pos(s(0)), y))), x, y)
round(x) → if(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x))
and(false, false) → false
and(false, true) → false
and(true, false) → false
and(true, true) → true
greatereq_int(pos(x), pos(0)) → true
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(0), neg(y)) → true
greatereq_int(pos(x), neg(y)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(neg(x), pos(s(y))) → false
greatereq_int(neg(s(x)), pos(0)) → false
greatereq_int(neg(s(x)), neg(0)) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
greatereq_int(neg(s(x)), neg(s(y))) → greatereq_int(neg(x), neg(y))
equal_int(pos(0), pos(0)) → true
equal_int(neg(0), pos(0)) → true
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), pos(0)) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(neg(x), pos(y)) → minus_nat(y, x)
plus_int(neg(x), neg(y)) → neg(plus_nat(x, y))
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(pos(x), neg(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
mod_int(neg(x), neg(y)) → neg(mod_nat(x, y))
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if1(true, x, y) → x
if1(false, x, y) → y
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)

The set Q consists of the following terms:

if(false, x0, x1)
minusNat(true, x0, x1)
if(true, x0, x1)
minus(x0, x1)
round(x0)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QReductionProof
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

EQUAL_INT(pos(s(x)), pos(s(y))) → EQUAL_INT(pos(x), pos(y))

R is empty.
The set Q consists of the following terms:

if(false, x0, x1)
minusNat(true, x0, x1)
if(true, x0, x1)
minus(x0, x1)
round(x0)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

if(false, x0, x1)
minusNat(true, x0, x1)
if(true, x0, x1)
minus(x0, x1)
round(x0)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
QDP
                        ↳ UsableRulesReductionPairsProof
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

EQUAL_INT(pos(s(x)), pos(s(y))) → EQUAL_INT(pos(x), pos(y))

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the usable rules with reduction pair processor [LPAR04] with a polynomial ordering [POLO], all dependency pairs and the corresponding usable rules [FROCOS05] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

The following dependency pairs can be deleted:

EQUAL_INT(pos(s(x)), pos(s(y))) → EQUAL_INT(pos(x), pos(y))
No rules are removed from R.

Used ordering: POLO with Polynomial interpretation [POLO]:

POL(EQUAL_INT(x1, x2)) = 2·x1 + x2   
POL(pos(x1)) = x1   
POL(s(x1)) = 2·x1   



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ UsableRulesReductionPairsProof
QDP
                            ↳ PisEmptyProof
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
P is empty.
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
QDP
                ↳ UsableRulesProof
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

GREATEREQ_INT(neg(s(x)), neg(s(y))) → GREATEREQ_INT(neg(x), neg(y))

The TRS R consists of the following rules:

if(false, u, v) → v
minusNat(true, x, y) → minus(x, round(x))
if(true, u, v) → u
minus(x, y) → minusNat(and(greatereq_int(y, pos(0)), equal_int(x, plus_int(pos(s(0)), y))), x, y)
round(x) → if(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x))
and(false, false) → false
and(false, true) → false
and(true, false) → false
and(true, true) → true
greatereq_int(pos(x), pos(0)) → true
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(0), neg(y)) → true
greatereq_int(pos(x), neg(y)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(neg(x), pos(s(y))) → false
greatereq_int(neg(s(x)), pos(0)) → false
greatereq_int(neg(s(x)), neg(0)) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
greatereq_int(neg(s(x)), neg(s(y))) → greatereq_int(neg(x), neg(y))
equal_int(pos(0), pos(0)) → true
equal_int(neg(0), pos(0)) → true
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), pos(0)) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(neg(x), pos(y)) → minus_nat(y, x)
plus_int(neg(x), neg(y)) → neg(plus_nat(x, y))
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(pos(x), neg(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
mod_int(neg(x), neg(y)) → neg(mod_nat(x, y))
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if1(true, x, y) → x
if1(false, x, y) → y
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)

The set Q consists of the following terms:

if(false, x0, x1)
minusNat(true, x0, x1)
if(true, x0, x1)
minus(x0, x1)
round(x0)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QReductionProof
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

GREATEREQ_INT(neg(s(x)), neg(s(y))) → GREATEREQ_INT(neg(x), neg(y))

R is empty.
The set Q consists of the following terms:

if(false, x0, x1)
minusNat(true, x0, x1)
if(true, x0, x1)
minus(x0, x1)
round(x0)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

if(false, x0, x1)
minusNat(true, x0, x1)
if(true, x0, x1)
minus(x0, x1)
round(x0)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
QDP
                        ↳ UsableRulesReductionPairsProof
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

GREATEREQ_INT(neg(s(x)), neg(s(y))) → GREATEREQ_INT(neg(x), neg(y))

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the usable rules with reduction pair processor [LPAR04] with a polynomial ordering [POLO], all dependency pairs and the corresponding usable rules [FROCOS05] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

The following dependency pairs can be deleted:

GREATEREQ_INT(neg(s(x)), neg(s(y))) → GREATEREQ_INT(neg(x), neg(y))
No rules are removed from R.

Used ordering: POLO with Polynomial interpretation [POLO]:

POL(GREATEREQ_INT(x1, x2)) = 2·x1 + x2   
POL(neg(x1)) = x1   
POL(s(x1)) = 2·x1   



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ UsableRulesReductionPairsProof
QDP
                            ↳ PisEmptyProof
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
P is empty.
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
QDP
                ↳ UsableRulesProof
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

GREATEREQ_INT(pos(s(x)), pos(s(y))) → GREATEREQ_INT(pos(x), pos(y))

The TRS R consists of the following rules:

if(false, u, v) → v
minusNat(true, x, y) → minus(x, round(x))
if(true, u, v) → u
minus(x, y) → minusNat(and(greatereq_int(y, pos(0)), equal_int(x, plus_int(pos(s(0)), y))), x, y)
round(x) → if(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x))
and(false, false) → false
and(false, true) → false
and(true, false) → false
and(true, true) → true
greatereq_int(pos(x), pos(0)) → true
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(0), neg(y)) → true
greatereq_int(pos(x), neg(y)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(neg(x), pos(s(y))) → false
greatereq_int(neg(s(x)), pos(0)) → false
greatereq_int(neg(s(x)), neg(0)) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
greatereq_int(neg(s(x)), neg(s(y))) → greatereq_int(neg(x), neg(y))
equal_int(pos(0), pos(0)) → true
equal_int(neg(0), pos(0)) → true
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), pos(0)) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(neg(x), pos(y)) → minus_nat(y, x)
plus_int(neg(x), neg(y)) → neg(plus_nat(x, y))
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(pos(x), neg(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
mod_int(neg(x), neg(y)) → neg(mod_nat(x, y))
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if1(true, x, y) → x
if1(false, x, y) → y
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)

The set Q consists of the following terms:

if(false, x0, x1)
minusNat(true, x0, x1)
if(true, x0, x1)
minus(x0, x1)
round(x0)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QReductionProof
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

GREATEREQ_INT(pos(s(x)), pos(s(y))) → GREATEREQ_INT(pos(x), pos(y))

R is empty.
The set Q consists of the following terms:

if(false, x0, x1)
minusNat(true, x0, x1)
if(true, x0, x1)
minus(x0, x1)
round(x0)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

if(false, x0, x1)
minusNat(true, x0, x1)
if(true, x0, x1)
minus(x0, x1)
round(x0)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
QDP
                        ↳ UsableRulesReductionPairsProof
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

GREATEREQ_INT(pos(s(x)), pos(s(y))) → GREATEREQ_INT(pos(x), pos(y))

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the usable rules with reduction pair processor [LPAR04] with a polynomial ordering [POLO], all dependency pairs and the corresponding usable rules [FROCOS05] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

The following dependency pairs can be deleted:

GREATEREQ_INT(pos(s(x)), pos(s(y))) → GREATEREQ_INT(pos(x), pos(y))
No rules are removed from R.

Used ordering: POLO with Polynomial interpretation [POLO]:

POL(GREATEREQ_INT(x1, x2)) = 2·x1 + x2   
POL(pos(x1)) = x1   
POL(s(x1)) = 2·x1   



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ UsableRulesReductionPairsProof
QDP
                            ↳ PisEmptyProof
              ↳ QDP
              ↳ QDP

Q DP problem:
P is empty.
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
QDP
                ↳ UsableRulesProof
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

MOD_NAT(s(x), s(y)) → MOD_NAT(minus_nat_s(x, y), s(y))

The TRS R consists of the following rules:

if(false, u, v) → v
minusNat(true, x, y) → minus(x, round(x))
if(true, u, v) → u
minus(x, y) → minusNat(and(greatereq_int(y, pos(0)), equal_int(x, plus_int(pos(s(0)), y))), x, y)
round(x) → if(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x))
and(false, false) → false
and(false, true) → false
and(true, false) → false
and(true, true) → true
greatereq_int(pos(x), pos(0)) → true
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(0), neg(y)) → true
greatereq_int(pos(x), neg(y)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(neg(x), pos(s(y))) → false
greatereq_int(neg(s(x)), pos(0)) → false
greatereq_int(neg(s(x)), neg(0)) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
greatereq_int(neg(s(x)), neg(s(y))) → greatereq_int(neg(x), neg(y))
equal_int(pos(0), pos(0)) → true
equal_int(neg(0), pos(0)) → true
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), pos(0)) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(neg(x), pos(y)) → minus_nat(y, x)
plus_int(neg(x), neg(y)) → neg(plus_nat(x, y))
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(pos(x), neg(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
mod_int(neg(x), neg(y)) → neg(mod_nat(x, y))
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if1(true, x, y) → x
if1(false, x, y) → y
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)

The set Q consists of the following terms:

if(false, x0, x1)
minusNat(true, x0, x1)
if(true, x0, x1)
minus(x0, x1)
round(x0)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QReductionProof
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

MOD_NAT(s(x), s(y)) → MOD_NAT(minus_nat_s(x, y), s(y))

The TRS R consists of the following rules:

minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)

The set Q consists of the following terms:

if(false, x0, x1)
minusNat(true, x0, x1)
if(true, x0, x1)
minus(x0, x1)
round(x0)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

if(false, x0, x1)
minusNat(true, x0, x1)
if(true, x0, x1)
minus(x0, x1)
round(x0)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
QDP
                        ↳ QDPOrderProof
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

MOD_NAT(s(x), s(y)) → MOD_NAT(minus_nat_s(x, y), s(y))

The TRS R consists of the following rules:

minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)

The set Q consists of the following terms:

minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


MOD_NAT(s(x), s(y)) → MOD_NAT(minus_nat_s(x, y), s(y))
The remaining pairs can at least be oriented weakly.
none
Used ordering: Matrix interpretation [MATRO]:

POL(MOD_NAT(x1, x2)) =
/11\
\11/
·x1 +
/0\
\0/
+
/11\
\00/
·x2

POL(s(x1)) =
/10\
\11/
·x1 +
/1\
\1/

POL(minus_nat_s(x1, x2)) =
/10\
\01/
·x1 +
/0\
\0/
+
/00\
\00/
·x2

POL(0) =
/0\
\0/

The following usable rules [FROCOS05] were oriented:

minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
minus_nat_s(0, s(y)) → 0
minus_nat_s(x, 0) → x



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ QDPOrderProof
QDP
                            ↳ PisEmptyProof
              ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)

The set Q consists of the following terms:

minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
QDP
                ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

MINUS(x, y) → MINUSNAT(and(greatereq_int(y, pos(0)), equal_int(x, plus_int(pos(s(0)), y))), x, y)
MINUSNAT(true, x, y) → MINUS(x, round(x))

The TRS R consists of the following rules:

if(false, u, v) → v
minusNat(true, x, y) → minus(x, round(x))
if(true, u, v) → u
minus(x, y) → minusNat(and(greatereq_int(y, pos(0)), equal_int(x, plus_int(pos(s(0)), y))), x, y)
round(x) → if(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x))
and(false, false) → false
and(false, true) → false
and(true, false) → false
and(true, true) → true
greatereq_int(pos(x), pos(0)) → true
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(0), neg(y)) → true
greatereq_int(pos(x), neg(y)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(neg(x), pos(s(y))) → false
greatereq_int(neg(s(x)), pos(0)) → false
greatereq_int(neg(s(x)), neg(0)) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
greatereq_int(neg(s(x)), neg(s(y))) → greatereq_int(neg(x), neg(y))
equal_int(pos(0), pos(0)) → true
equal_int(neg(0), pos(0)) → true
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), pos(0)) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(neg(x), pos(y)) → minus_nat(y, x)
plus_int(neg(x), neg(y)) → neg(plus_nat(x, y))
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(pos(x), neg(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
mod_int(neg(x), neg(y)) → neg(mod_nat(x, y))
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if1(true, x, y) → x
if1(false, x, y) → y
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)

The set Q consists of the following terms:

if(false, x0, x1)
minusNat(true, x0, x1)
if(true, x0, x1)
minus(x0, x1)
round(x0)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QReductionProof

Q DP problem:
The TRS P consists of the following rules:

MINUS(x, y) → MINUSNAT(and(greatereq_int(y, pos(0)), equal_int(x, plus_int(pos(s(0)), y))), x, y)
MINUSNAT(true, x, y) → MINUS(x, round(x))

The TRS R consists of the following rules:

greatereq_int(pos(x), pos(0)) → true
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
equal_int(pos(0), pos(0)) → true
equal_int(neg(0), pos(0)) → true
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), pos(0)) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(false, false) → false
and(false, true) → false
and(true, false) → false
and(true, true) → true
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
round(x) → if(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x))
mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
if(false, u, v) → v
if(true, u, v) → u
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y

The set Q consists of the following terms:

if(false, x0, x1)
minusNat(true, x0, x1)
if(true, x0, x1)
minus(x0, x1)
round(x0)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

minusNat(true, x0, x1)
minus(x0, x1)



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
QDP
                        ↳ Rewriting

Q DP problem:
The TRS P consists of the following rules:

MINUS(x, y) → MINUSNAT(and(greatereq_int(y, pos(0)), equal_int(x, plus_int(pos(s(0)), y))), x, y)
MINUSNAT(true, x, y) → MINUS(x, round(x))

The TRS R consists of the following rules:

greatereq_int(pos(x), pos(0)) → true
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
equal_int(pos(0), pos(0)) → true
equal_int(neg(0), pos(0)) → true
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), pos(0)) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(false, false) → false
and(false, true) → false
and(true, false) → false
and(true, true) → true
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
round(x) → if(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x))
mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
if(false, u, v) → v
if(true, u, v) → u
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
round(x0)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
By rewriting [LPAR04] the rule MINUSNAT(true, x, y) → MINUS(x, round(x)) at position [1] we obtained the following new rules [LPAR04]:

MINUSNAT(true, x, y) → MINUS(x, if(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x)))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
QDP
                            ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

MINUS(x, y) → MINUSNAT(and(greatereq_int(y, pos(0)), equal_int(x, plus_int(pos(s(0)), y))), x, y)
MINUSNAT(true, x, y) → MINUS(x, if(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x)))

The TRS R consists of the following rules:

greatereq_int(pos(x), pos(0)) → true
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
equal_int(pos(0), pos(0)) → true
equal_int(neg(0), pos(0)) → true
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), pos(0)) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(false, false) → false
and(false, true) → false
and(true, false) → false
and(true, true) → true
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
round(x) → if(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x))
mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
if(false, u, v) → v
if(true, u, v) → u
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
round(x0)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
QDP
                                ↳ QReductionProof

Q DP problem:
The TRS P consists of the following rules:

MINUS(x, y) → MINUSNAT(and(greatereq_int(y, pos(0)), equal_int(x, plus_int(pos(s(0)), y))), x, y)
MINUSNAT(true, x, y) → MINUS(x, if(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x)))

The TRS R consists of the following rules:

mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
equal_int(pos(0), pos(0)) → true
equal_int(neg(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
equal_int(neg(s(x)), pos(0)) → false
plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
if(false, u, v) → v
if(true, u, v) → u
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(false, false) → false
and(false, true) → false
and(true, false) → false
and(true, true) → true

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
round(x0)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

round(x0)



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

MINUS(x, y) → MINUSNAT(and(greatereq_int(y, pos(0)), equal_int(x, plus_int(pos(s(0)), y))), x, y)
MINUSNAT(true, x, y) → MINUS(x, if(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x)))

The TRS R consists of the following rules:

mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
equal_int(pos(0), pos(0)) → true
equal_int(neg(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
equal_int(neg(s(x)), pos(0)) → false
plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
if(false, u, v) → v
if(true, u, v) → u
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(false, false) → false
and(false, true) → false
and(true, false) → false
and(true, true) → true

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
In the following pairs the term without variables pos(s(s(0))) is replaced by the fresh variable x_removed.
Pair: MINUSNAT(true, x, y) → MINUS(x, if(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x)))
Positions in right side of the pair: The new variable was added to all pairs as a new argument[CONREM].

↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
QDP
                                    ↳ RemovalProof
                                    ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

MINUS(x, y, x_removed) → MINUSNAT(and(greatereq_int(y, pos(0)), equal_int(x, plus_int(pos(s(0)), y))), x, y, x_removed)
MINUSNAT(true, x, y, x_removed) → MINUS(x, if(equal_int(mod_int(x, x_removed), pos(0)), x, plus_int(pos(s(0)), x)), x_removed)

The TRS R consists of the following rules:

mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
equal_int(pos(0), pos(0)) → true
equal_int(neg(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
equal_int(neg(s(x)), pos(0)) → false
plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
if(false, u, v) → v
if(true, u, v) → u
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(false, false) → false
and(false, true) → false
and(true, false) → false
and(true, true) → true

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
In the following pairs the term without variables pos(s(s(0))) is replaced by the fresh variable x_removed.
Pair: MINUSNAT(true, x, y) → MINUS(x, if(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x)))
Positions in right side of the pair: The new variable was added to all pairs as a new argument[CONREM].

↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
QDP
                                    ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

MINUS(x, y, x_removed) → MINUSNAT(and(greatereq_int(y, pos(0)), equal_int(x, plus_int(pos(s(0)), y))), x, y, x_removed)
MINUSNAT(true, x, y, x_removed) → MINUS(x, if(equal_int(mod_int(x, x_removed), pos(0)), x, plus_int(pos(s(0)), x)), x_removed)

The TRS R consists of the following rules:

mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
equal_int(pos(0), pos(0)) → true
equal_int(neg(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
equal_int(neg(s(x)), pos(0)) → false
plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
if(false, u, v) → v
if(true, u, v) → u
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(false, false) → false
and(false, true) → false
and(true, false) → false
and(true, true) → true

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
By narrowing [LPAR04] the rule MINUS(x, y) → MINUSNAT(and(greatereq_int(y, pos(0)), equal_int(x, plus_int(pos(s(0)), y))), x, y) at position [0] we obtained the following new rules [LPAR04]:

MINUS(y0, neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(y0, minus_nat(s(0), x1))), y0, neg(x1))
MINUS(y0, neg(s(x0))) → MINUSNAT(and(false, equal_int(y0, plus_int(pos(s(0)), neg(s(x0))))), y0, neg(s(x0)))
MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, plus_int(pos(s(0)), pos(x0)))), y0, pos(x0))
MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, plus_int(pos(s(0)), neg(0)))), y0, neg(0))
MINUS(y0, pos(x1)) → MINUSNAT(and(greatereq_int(pos(x1), pos(0)), equal_int(y0, pos(plus_nat(s(0), x1)))), y0, pos(x1))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
QDP
                                        ↳ Rewriting

Q DP problem:
The TRS P consists of the following rules:

MINUSNAT(true, x, y) → MINUS(x, if(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x)))
MINUS(y0, neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(y0, minus_nat(s(0), x1))), y0, neg(x1))
MINUS(y0, neg(s(x0))) → MINUSNAT(and(false, equal_int(y0, plus_int(pos(s(0)), neg(s(x0))))), y0, neg(s(x0)))
MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, plus_int(pos(s(0)), pos(x0)))), y0, pos(x0))
MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, plus_int(pos(s(0)), neg(0)))), y0, neg(0))
MINUS(y0, pos(x1)) → MINUSNAT(and(greatereq_int(pos(x1), pos(0)), equal_int(y0, pos(plus_nat(s(0), x1)))), y0, pos(x1))

The TRS R consists of the following rules:

mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
equal_int(pos(0), pos(0)) → true
equal_int(neg(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
equal_int(neg(s(x)), pos(0)) → false
plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
if(false, u, v) → v
if(true, u, v) → u
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(false, false) → false
and(false, true) → false
and(true, false) → false
and(true, true) → true

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
By rewriting [LPAR04] the rule MINUS(y0, neg(s(x0))) → MINUSNAT(and(false, equal_int(y0, plus_int(pos(s(0)), neg(s(x0))))), y0, neg(s(x0))) at position [0,1,1] we obtained the following new rules [LPAR04]:

MINUS(y0, neg(s(x0))) → MINUSNAT(and(false, equal_int(y0, minus_nat(s(0), s(x0)))), y0, neg(s(x0)))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
QDP
                                            ↳ Rewriting

Q DP problem:
The TRS P consists of the following rules:

MINUSNAT(true, x, y) → MINUS(x, if(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x)))
MINUS(y0, neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(y0, minus_nat(s(0), x1))), y0, neg(x1))
MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, plus_int(pos(s(0)), pos(x0)))), y0, pos(x0))
MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, plus_int(pos(s(0)), neg(0)))), y0, neg(0))
MINUS(y0, pos(x1)) → MINUSNAT(and(greatereq_int(pos(x1), pos(0)), equal_int(y0, pos(plus_nat(s(0), x1)))), y0, pos(x1))
MINUS(y0, neg(s(x0))) → MINUSNAT(and(false, equal_int(y0, minus_nat(s(0), s(x0)))), y0, neg(s(x0)))

The TRS R consists of the following rules:

mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
equal_int(pos(0), pos(0)) → true
equal_int(neg(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
equal_int(neg(s(x)), pos(0)) → false
plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
if(false, u, v) → v
if(true, u, v) → u
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(false, false) → false
and(false, true) → false
and(true, false) → false
and(true, true) → true

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
By rewriting [LPAR04] the rule MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, plus_int(pos(s(0)), pos(x0)))), y0, pos(x0)) at position [0,1,1] we obtained the following new rules [LPAR04]:

MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(plus_nat(s(0), x0)))), y0, pos(x0))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
QDP
                                                ↳ Rewriting

Q DP problem:
The TRS P consists of the following rules:

MINUSNAT(true, x, y) → MINUS(x, if(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x)))
MINUS(y0, neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(y0, minus_nat(s(0), x1))), y0, neg(x1))
MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, plus_int(pos(s(0)), neg(0)))), y0, neg(0))
MINUS(y0, pos(x1)) → MINUSNAT(and(greatereq_int(pos(x1), pos(0)), equal_int(y0, pos(plus_nat(s(0), x1)))), y0, pos(x1))
MINUS(y0, neg(s(x0))) → MINUSNAT(and(false, equal_int(y0, minus_nat(s(0), s(x0)))), y0, neg(s(x0)))
MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(plus_nat(s(0), x0)))), y0, pos(x0))

The TRS R consists of the following rules:

mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
equal_int(pos(0), pos(0)) → true
equal_int(neg(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
equal_int(neg(s(x)), pos(0)) → false
plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
if(false, u, v) → v
if(true, u, v) → u
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(false, false) → false
and(false, true) → false
and(true, false) → false
and(true, true) → true

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
By rewriting [LPAR04] the rule MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, plus_int(pos(s(0)), neg(0)))), y0, neg(0)) at position [0,1,1] we obtained the following new rules [LPAR04]:

MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, minus_nat(s(0), 0))), y0, neg(0))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
QDP
                                                    ↳ Rewriting

Q DP problem:
The TRS P consists of the following rules:

MINUSNAT(true, x, y) → MINUS(x, if(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x)))
MINUS(y0, neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(y0, minus_nat(s(0), x1))), y0, neg(x1))
MINUS(y0, pos(x1)) → MINUSNAT(and(greatereq_int(pos(x1), pos(0)), equal_int(y0, pos(plus_nat(s(0), x1)))), y0, pos(x1))
MINUS(y0, neg(s(x0))) → MINUSNAT(and(false, equal_int(y0, minus_nat(s(0), s(x0)))), y0, neg(s(x0)))
MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(plus_nat(s(0), x0)))), y0, pos(x0))
MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, minus_nat(s(0), 0))), y0, neg(0))

The TRS R consists of the following rules:

mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
equal_int(pos(0), pos(0)) → true
equal_int(neg(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
equal_int(neg(s(x)), pos(0)) → false
plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
if(false, u, v) → v
if(true, u, v) → u
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(false, false) → false
and(false, true) → false
and(true, false) → false
and(true, true) → true

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
By rewriting [LPAR04] the rule MINUS(y0, pos(x1)) → MINUSNAT(and(greatereq_int(pos(x1), pos(0)), equal_int(y0, pos(plus_nat(s(0), x1)))), y0, pos(x1)) at position [0,0] we obtained the following new rules [LPAR04]:

MINUS(y0, pos(x1)) → MINUSNAT(and(true, equal_int(y0, pos(plus_nat(s(0), x1)))), y0, pos(x1))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
QDP
                                                        ↳ Rewriting

Q DP problem:
The TRS P consists of the following rules:

MINUSNAT(true, x, y) → MINUS(x, if(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x)))
MINUS(y0, neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(y0, minus_nat(s(0), x1))), y0, neg(x1))
MINUS(y0, neg(s(x0))) → MINUSNAT(and(false, equal_int(y0, minus_nat(s(0), s(x0)))), y0, neg(s(x0)))
MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(plus_nat(s(0), x0)))), y0, pos(x0))
MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, minus_nat(s(0), 0))), y0, neg(0))

The TRS R consists of the following rules:

mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
equal_int(pos(0), pos(0)) → true
equal_int(neg(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
equal_int(neg(s(x)), pos(0)) → false
plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
if(false, u, v) → v
if(true, u, v) → u
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(false, false) → false
and(false, true) → false
and(true, false) → false
and(true, true) → true

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
By rewriting [LPAR04] the rule MINUS(y0, neg(s(x0))) → MINUSNAT(and(false, equal_int(y0, minus_nat(s(0), s(x0)))), y0, neg(s(x0))) at position [0,1,1] we obtained the following new rules [LPAR04]:

MINUS(y0, neg(s(x0))) → MINUSNAT(and(false, equal_int(y0, minus_nat(0, x0))), y0, neg(s(x0)))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
QDP
                                                            ↳ Rewriting

Q DP problem:
The TRS P consists of the following rules:

MINUSNAT(true, x, y) → MINUS(x, if(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x)))
MINUS(y0, neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(y0, minus_nat(s(0), x1))), y0, neg(x1))
MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(plus_nat(s(0), x0)))), y0, pos(x0))
MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, minus_nat(s(0), 0))), y0, neg(0))
MINUS(y0, neg(s(x0))) → MINUSNAT(and(false, equal_int(y0, minus_nat(0, x0))), y0, neg(s(x0)))

The TRS R consists of the following rules:

mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
equal_int(pos(0), pos(0)) → true
equal_int(neg(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
equal_int(neg(s(x)), pos(0)) → false
plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
if(false, u, v) → v
if(true, u, v) → u
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(false, false) → false
and(false, true) → false
and(true, false) → false
and(true, true) → true

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
By rewriting [LPAR04] the rule MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(plus_nat(s(0), x0)))), y0, pos(x0)) at position [0,1,1,0] we obtained the following new rules [LPAR04]:

MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(s(plus_nat(0, x0))))), y0, pos(x0))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
QDP
                                                                ↳ Rewriting

Q DP problem:
The TRS P consists of the following rules:

MINUSNAT(true, x, y) → MINUS(x, if(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x)))
MINUS(y0, neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(y0, minus_nat(s(0), x1))), y0, neg(x1))
MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, minus_nat(s(0), 0))), y0, neg(0))
MINUS(y0, neg(s(x0))) → MINUSNAT(and(false, equal_int(y0, minus_nat(0, x0))), y0, neg(s(x0)))
MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(s(plus_nat(0, x0))))), y0, pos(x0))

The TRS R consists of the following rules:

mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
equal_int(pos(0), pos(0)) → true
equal_int(neg(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
equal_int(neg(s(x)), pos(0)) → false
plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
if(false, u, v) → v
if(true, u, v) → u
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(false, false) → false
and(false, true) → false
and(true, false) → false
and(true, true) → true

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
By rewriting [LPAR04] the rule MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, minus_nat(s(0), 0))), y0, neg(0)) at position [0,1,1] we obtained the following new rules [LPAR04]:

MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, pos(s(0)))), y0, neg(0))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
QDP
                                                                    ↳ Rewriting

Q DP problem:
The TRS P consists of the following rules:

MINUSNAT(true, x, y) → MINUS(x, if(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x)))
MINUS(y0, neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(y0, minus_nat(s(0), x1))), y0, neg(x1))
MINUS(y0, neg(s(x0))) → MINUSNAT(and(false, equal_int(y0, minus_nat(0, x0))), y0, neg(s(x0)))
MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(s(plus_nat(0, x0))))), y0, pos(x0))
MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, pos(s(0)))), y0, neg(0))

The TRS R consists of the following rules:

mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
equal_int(pos(0), pos(0)) → true
equal_int(neg(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
equal_int(neg(s(x)), pos(0)) → false
plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
if(false, u, v) → v
if(true, u, v) → u
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(false, false) → false
and(false, true) → false
and(true, false) → false
and(true, true) → true

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
By rewriting [LPAR04] the rule MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(s(plus_nat(0, x0))))), y0, pos(x0)) at position [0,1,1,0,0] we obtained the following new rules [LPAR04]:

MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(s(x0)))), y0, pos(x0))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
QDP
                                                                        ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

MINUSNAT(true, x, y) → MINUS(x, if(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x)))
MINUS(y0, neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(y0, minus_nat(s(0), x1))), y0, neg(x1))
MINUS(y0, neg(s(x0))) → MINUSNAT(and(false, equal_int(y0, minus_nat(0, x0))), y0, neg(s(x0)))
MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, pos(s(0)))), y0, neg(0))
MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(s(x0)))), y0, pos(x0))

The TRS R consists of the following rules:

mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
equal_int(pos(0), pos(0)) → true
equal_int(neg(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
equal_int(neg(s(x)), pos(0)) → false
plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
if(false, u, v) → v
if(true, u, v) → u
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(false, false) → false
and(false, true) → false
and(true, false) → false
and(true, true) → true

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
By narrowing [LPAR04] the rule MINUSNAT(true, x, y) → MINUS(x, if(equal_int(mod_int(x, pos(s(s(0)))), pos(0)), x, plus_int(pos(s(0)), x))) at position [1] we obtained the following new rules [LPAR04]:

MINUSNAT(true, neg(x0), y1) → MINUS(neg(x0), if(equal_int(neg(mod_nat(x0, s(s(0)))), pos(0)), neg(x0), plus_int(pos(s(0)), neg(x0))))
MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(mod_int(pos(x1), pos(s(s(0)))), pos(0)), pos(x1), pos(plus_nat(s(0), x1))))
MINUSNAT(true, neg(x1), y1) → MINUS(neg(x1), if(equal_int(mod_int(neg(x1), pos(s(s(0)))), pos(0)), neg(x1), minus_nat(s(0), x1)))
MINUSNAT(true, pos(x0), y1) → MINUS(pos(x0), if(equal_int(pos(mod_nat(x0, s(s(0)))), pos(0)), pos(x0), plus_int(pos(s(0)), pos(x0))))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
QDP
                                                                            ↳ Rewriting

Q DP problem:
The TRS P consists of the following rules:

MINUS(y0, neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(y0, minus_nat(s(0), x1))), y0, neg(x1))
MINUS(y0, neg(s(x0))) → MINUSNAT(and(false, equal_int(y0, minus_nat(0, x0))), y0, neg(s(x0)))
MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, pos(s(0)))), y0, neg(0))
MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(s(x0)))), y0, pos(x0))
MINUSNAT(true, neg(x0), y1) → MINUS(neg(x0), if(equal_int(neg(mod_nat(x0, s(s(0)))), pos(0)), neg(x0), plus_int(pos(s(0)), neg(x0))))
MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(mod_int(pos(x1), pos(s(s(0)))), pos(0)), pos(x1), pos(plus_nat(s(0), x1))))
MINUSNAT(true, neg(x1), y1) → MINUS(neg(x1), if(equal_int(mod_int(neg(x1), pos(s(s(0)))), pos(0)), neg(x1), minus_nat(s(0), x1)))
MINUSNAT(true, pos(x0), y1) → MINUS(pos(x0), if(equal_int(pos(mod_nat(x0, s(s(0)))), pos(0)), pos(x0), plus_int(pos(s(0)), pos(x0))))

The TRS R consists of the following rules:

mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
equal_int(pos(0), pos(0)) → true
equal_int(neg(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
equal_int(neg(s(x)), pos(0)) → false
plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
if(false, u, v) → v
if(true, u, v) → u
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(false, false) → false
and(false, true) → false
and(true, false) → false
and(true, true) → true

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
By rewriting [LPAR04] the rule MINUSNAT(true, neg(x0), y1) → MINUS(neg(x0), if(equal_int(neg(mod_nat(x0, s(s(0)))), pos(0)), neg(x0), plus_int(pos(s(0)), neg(x0)))) at position [1,2] we obtained the following new rules [LPAR04]:

MINUSNAT(true, neg(x0), y1) → MINUS(neg(x0), if(equal_int(neg(mod_nat(x0, s(s(0)))), pos(0)), neg(x0), minus_nat(s(0), x0)))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
QDP
                                                                                ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

MINUS(y0, neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(y0, minus_nat(s(0), x1))), y0, neg(x1))
MINUS(y0, neg(s(x0))) → MINUSNAT(and(false, equal_int(y0, minus_nat(0, x0))), y0, neg(s(x0)))
MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, pos(s(0)))), y0, neg(0))
MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(s(x0)))), y0, pos(x0))
MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(mod_int(pos(x1), pos(s(s(0)))), pos(0)), pos(x1), pos(plus_nat(s(0), x1))))
MINUSNAT(true, neg(x1), y1) → MINUS(neg(x1), if(equal_int(mod_int(neg(x1), pos(s(s(0)))), pos(0)), neg(x1), minus_nat(s(0), x1)))
MINUSNAT(true, pos(x0), y1) → MINUS(pos(x0), if(equal_int(pos(mod_nat(x0, s(s(0)))), pos(0)), pos(x0), plus_int(pos(s(0)), pos(x0))))
MINUSNAT(true, neg(x0), y1) → MINUS(neg(x0), if(equal_int(neg(mod_nat(x0, s(s(0)))), pos(0)), neg(x0), minus_nat(s(0), x0)))

The TRS R consists of the following rules:

mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
equal_int(pos(0), pos(0)) → true
equal_int(neg(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
equal_int(neg(s(x)), pos(0)) → false
plus_int(pos(x), neg(y)) → minus_nat(x, y)
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
if(false, u, v) → v
if(true, u, v) → u
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(false, false) → false
and(false, true) → false
and(true, false) → false
and(true, true) → true

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ UsableRulesProof
QDP
                                                                                    ↳ Rewriting

Q DP problem:
The TRS P consists of the following rules:

MINUS(y0, neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(y0, minus_nat(s(0), x1))), y0, neg(x1))
MINUS(y0, neg(s(x0))) → MINUSNAT(and(false, equal_int(y0, minus_nat(0, x0))), y0, neg(s(x0)))
MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, pos(s(0)))), y0, neg(0))
MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(s(x0)))), y0, pos(x0))
MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(mod_int(pos(x1), pos(s(s(0)))), pos(0)), pos(x1), pos(plus_nat(s(0), x1))))
MINUSNAT(true, neg(x1), y1) → MINUS(neg(x1), if(equal_int(mod_int(neg(x1), pos(s(s(0)))), pos(0)), neg(x1), minus_nat(s(0), x1)))
MINUSNAT(true, pos(x0), y1) → MINUS(pos(x0), if(equal_int(pos(mod_nat(x0, s(s(0)))), pos(0)), pos(x0), plus_int(pos(s(0)), pos(x0))))
MINUSNAT(true, neg(x0), y1) → MINUS(neg(x0), if(equal_int(neg(mod_nat(x0, s(s(0)))), pos(0)), neg(x0), minus_nat(s(0), x0)))

The TRS R consists of the following rules:

mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
equal_int(pos(0), pos(0)) → true
equal_int(neg(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
equal_int(neg(s(x)), pos(0)) → false
plus_nat(s(x), y) → s(plus_nat(x, y))
if(false, u, v) → v
if(true, u, v) → u
plus_nat(0, x) → x
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
and(true, false) → false
and(true, true) → true
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(false, false) → false
and(false, true) → false
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
By rewriting [LPAR04] the rule MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(mod_int(pos(x1), pos(s(s(0)))), pos(0)), pos(x1), pos(plus_nat(s(0), x1)))) at position [1,0,0] we obtained the following new rules [LPAR04]:

MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(pos(mod_nat(x1, s(s(0)))), pos(0)), pos(x1), pos(plus_nat(s(0), x1))))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ UsableRulesProof
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
QDP
                                                                                        ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

MINUS(y0, neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(y0, minus_nat(s(0), x1))), y0, neg(x1))
MINUS(y0, neg(s(x0))) → MINUSNAT(and(false, equal_int(y0, minus_nat(0, x0))), y0, neg(s(x0)))
MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, pos(s(0)))), y0, neg(0))
MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(s(x0)))), y0, pos(x0))
MINUSNAT(true, neg(x1), y1) → MINUS(neg(x1), if(equal_int(mod_int(neg(x1), pos(s(s(0)))), pos(0)), neg(x1), minus_nat(s(0), x1)))
MINUSNAT(true, pos(x0), y1) → MINUS(pos(x0), if(equal_int(pos(mod_nat(x0, s(s(0)))), pos(0)), pos(x0), plus_int(pos(s(0)), pos(x0))))
MINUSNAT(true, neg(x0), y1) → MINUS(neg(x0), if(equal_int(neg(mod_nat(x0, s(s(0)))), pos(0)), neg(x0), minus_nat(s(0), x0)))
MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(pos(mod_nat(x1, s(s(0)))), pos(0)), pos(x1), pos(plus_nat(s(0), x1))))

The TRS R consists of the following rules:

mod_int(pos(x), pos(y)) → pos(mod_nat(x, y))
equal_int(pos(0), pos(0)) → true
equal_int(neg(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
equal_int(neg(s(x)), pos(0)) → false
plus_nat(s(x), y) → s(plus_nat(x, y))
if(false, u, v) → v
if(true, u, v) → u
plus_nat(0, x) → x
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
and(true, false) → false
and(true, true) → true
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(false, false) → false
and(false, true) → false
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ UsableRulesProof
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ UsableRulesProof
QDP
                                                                                            ↳ Rewriting

Q DP problem:
The TRS P consists of the following rules:

MINUS(y0, neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(y0, minus_nat(s(0), x1))), y0, neg(x1))
MINUS(y0, neg(s(x0))) → MINUSNAT(and(false, equal_int(y0, minus_nat(0, x0))), y0, neg(s(x0)))
MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, pos(s(0)))), y0, neg(0))
MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(s(x0)))), y0, pos(x0))
MINUSNAT(true, neg(x1), y1) → MINUS(neg(x1), if(equal_int(mod_int(neg(x1), pos(s(s(0)))), pos(0)), neg(x1), minus_nat(s(0), x1)))
MINUSNAT(true, pos(x0), y1) → MINUS(pos(x0), if(equal_int(pos(mod_nat(x0, s(s(0)))), pos(0)), pos(x0), plus_int(pos(s(0)), pos(x0))))
MINUSNAT(true, neg(x0), y1) → MINUS(neg(x0), if(equal_int(neg(mod_nat(x0, s(s(0)))), pos(0)), neg(x0), minus_nat(s(0), x0)))
MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(pos(mod_nat(x1, s(s(0)))), pos(0)), pos(x1), pos(plus_nat(s(0), x1))))

The TRS R consists of the following rules:

mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
equal_int(pos(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
if(false, u, v) → v
if(true, u, v) → u
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
equal_int(neg(0), pos(0)) → true
equal_int(neg(s(x)), pos(0)) → false
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
and(true, false) → false
and(true, true) → true
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(false, false) → false
and(false, true) → false
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
By rewriting [LPAR04] the rule MINUSNAT(true, neg(x1), y1) → MINUS(neg(x1), if(equal_int(mod_int(neg(x1), pos(s(s(0)))), pos(0)), neg(x1), minus_nat(s(0), x1))) at position [1,0,0] we obtained the following new rules [LPAR04]:

MINUSNAT(true, neg(x1), y1) → MINUS(neg(x1), if(equal_int(neg(mod_nat(x1, s(s(0)))), pos(0)), neg(x1), minus_nat(s(0), x1)))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ UsableRulesProof
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ UsableRulesProof
                                                                                          ↳ QDP
                                                                                            ↳ Rewriting
QDP
                                                                                                ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

MINUS(y0, neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(y0, minus_nat(s(0), x1))), y0, neg(x1))
MINUS(y0, neg(s(x0))) → MINUSNAT(and(false, equal_int(y0, minus_nat(0, x0))), y0, neg(s(x0)))
MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, pos(s(0)))), y0, neg(0))
MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(s(x0)))), y0, pos(x0))
MINUSNAT(true, pos(x0), y1) → MINUS(pos(x0), if(equal_int(pos(mod_nat(x0, s(s(0)))), pos(0)), pos(x0), plus_int(pos(s(0)), pos(x0))))
MINUSNAT(true, neg(x0), y1) → MINUS(neg(x0), if(equal_int(neg(mod_nat(x0, s(s(0)))), pos(0)), neg(x0), minus_nat(s(0), x0)))
MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(pos(mod_nat(x1, s(s(0)))), pos(0)), pos(x1), pos(plus_nat(s(0), x1))))

The TRS R consists of the following rules:

mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
equal_int(pos(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
if(false, u, v) → v
if(true, u, v) → u
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y
mod_int(neg(x), pos(y)) → neg(mod_nat(x, y))
equal_int(neg(0), pos(0)) → true
equal_int(neg(s(x)), pos(0)) → false
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
and(true, false) → false
and(true, true) → true
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(false, false) → false
and(false, true) → false
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ UsableRulesProof
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ UsableRulesProof
                                                                                          ↳ QDP
                                                                                            ↳ Rewriting
                                                                                              ↳ QDP
                                                                                                ↳ UsableRulesProof
QDP
                                                                                                    ↳ QReductionProof

Q DP problem:
The TRS P consists of the following rules:

MINUS(y0, neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(y0, minus_nat(s(0), x1))), y0, neg(x1))
MINUS(y0, neg(s(x0))) → MINUSNAT(and(false, equal_int(y0, minus_nat(0, x0))), y0, neg(s(x0)))
MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, pos(s(0)))), y0, neg(0))
MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(s(x0)))), y0, pos(x0))
MINUSNAT(true, pos(x0), y1) → MINUS(pos(x0), if(equal_int(pos(mod_nat(x0, s(s(0)))), pos(0)), pos(x0), plus_int(pos(s(0)), pos(x0))))
MINUSNAT(true, neg(x0), y1) → MINUS(neg(x0), if(equal_int(neg(mod_nat(x0, s(s(0)))), pos(0)), neg(x0), minus_nat(s(0), x0)))
MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(pos(mod_nat(x1, s(s(0)))), pos(0)), pos(x1), pos(plus_nat(s(0), x1))))

The TRS R consists of the following rules:

mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
equal_int(pos(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
if(false, u, v) → v
if(true, u, v) → u
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y
equal_int(neg(0), pos(0)) → true
equal_int(neg(s(x)), pos(0)) → false
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
and(true, false) → false
and(true, true) → true
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(false, false) → false
and(false, true) → false
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

mod_int(pos(x0), pos(x1))
mod_int(pos(x0), neg(x1))
mod_int(neg(x0), pos(x1))
mod_int(neg(x0), neg(x1))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ UsableRulesProof
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ UsableRulesProof
                                                                                          ↳ QDP
                                                                                            ↳ Rewriting
                                                                                              ↳ QDP
                                                                                                ↳ UsableRulesProof
                                                                                                  ↳ QDP
                                                                                                    ↳ QReductionProof
QDP
                                                                                                        ↳ Rewriting

Q DP problem:
The TRS P consists of the following rules:

MINUS(y0, neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(y0, minus_nat(s(0), x1))), y0, neg(x1))
MINUS(y0, neg(s(x0))) → MINUSNAT(and(false, equal_int(y0, minus_nat(0, x0))), y0, neg(s(x0)))
MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, pos(s(0)))), y0, neg(0))
MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(s(x0)))), y0, pos(x0))
MINUSNAT(true, pos(x0), y1) → MINUS(pos(x0), if(equal_int(pos(mod_nat(x0, s(s(0)))), pos(0)), pos(x0), plus_int(pos(s(0)), pos(x0))))
MINUSNAT(true, neg(x0), y1) → MINUS(neg(x0), if(equal_int(neg(mod_nat(x0, s(s(0)))), pos(0)), neg(x0), minus_nat(s(0), x0)))
MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(pos(mod_nat(x1, s(s(0)))), pos(0)), pos(x1), pos(plus_nat(s(0), x1))))

The TRS R consists of the following rules:

mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
equal_int(pos(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
if(false, u, v) → v
if(true, u, v) → u
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y
equal_int(neg(0), pos(0)) → true
equal_int(neg(s(x)), pos(0)) → false
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
and(true, false) → false
and(true, true) → true
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(false, false) → false
and(false, true) → false
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
By rewriting [LPAR04] the rule MINUSNAT(true, pos(x0), y1) → MINUS(pos(x0), if(equal_int(pos(mod_nat(x0, s(s(0)))), pos(0)), pos(x0), plus_int(pos(s(0)), pos(x0)))) at position [1,2] we obtained the following new rules [LPAR04]:

MINUSNAT(true, pos(x0), y1) → MINUS(pos(x0), if(equal_int(pos(mod_nat(x0, s(s(0)))), pos(0)), pos(x0), pos(plus_nat(s(0), x0))))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ UsableRulesProof
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ UsableRulesProof
                                                                                          ↳ QDP
                                                                                            ↳ Rewriting
                                                                                              ↳ QDP
                                                                                                ↳ UsableRulesProof
                                                                                                  ↳ QDP
                                                                                                    ↳ QReductionProof
                                                                                                      ↳ QDP
                                                                                                        ↳ Rewriting
QDP
                                                                                                            ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

MINUS(y0, neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(y0, minus_nat(s(0), x1))), y0, neg(x1))
MINUS(y0, neg(s(x0))) → MINUSNAT(and(false, equal_int(y0, minus_nat(0, x0))), y0, neg(s(x0)))
MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, pos(s(0)))), y0, neg(0))
MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(s(x0)))), y0, pos(x0))
MINUSNAT(true, neg(x0), y1) → MINUS(neg(x0), if(equal_int(neg(mod_nat(x0, s(s(0)))), pos(0)), neg(x0), minus_nat(s(0), x0)))
MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(pos(mod_nat(x1, s(s(0)))), pos(0)), pos(x1), pos(plus_nat(s(0), x1))))

The TRS R consists of the following rules:

mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
equal_int(pos(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
plus_int(pos(x), pos(y)) → pos(plus_nat(x, y))
if(false, u, v) → v
if(true, u, v) → u
plus_nat(0, x) → x
plus_nat(s(x), y) → s(plus_nat(x, y))
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y
equal_int(neg(0), pos(0)) → true
equal_int(neg(s(x)), pos(0)) → false
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
and(true, false) → false
and(true, true) → true
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(false, false) → false
and(false, true) → false
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ UsableRulesProof
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ UsableRulesProof
                                                                                          ↳ QDP
                                                                                            ↳ Rewriting
                                                                                              ↳ QDP
                                                                                                ↳ UsableRulesProof
                                                                                                  ↳ QDP
                                                                                                    ↳ QReductionProof
                                                                                                      ↳ QDP
                                                                                                        ↳ Rewriting
                                                                                                          ↳ QDP
                                                                                                            ↳ UsableRulesProof
QDP
                                                                                                                ↳ QReductionProof

Q DP problem:
The TRS P consists of the following rules:

MINUS(y0, neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(y0, minus_nat(s(0), x1))), y0, neg(x1))
MINUS(y0, neg(s(x0))) → MINUSNAT(and(false, equal_int(y0, minus_nat(0, x0))), y0, neg(s(x0)))
MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, pos(s(0)))), y0, neg(0))
MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(s(x0)))), y0, pos(x0))
MINUSNAT(true, neg(x0), y1) → MINUS(neg(x0), if(equal_int(neg(mod_nat(x0, s(s(0)))), pos(0)), neg(x0), minus_nat(s(0), x0)))
MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(pos(mod_nat(x1, s(s(0)))), pos(0)), pos(x1), pos(plus_nat(s(0), x1))))

The TRS R consists of the following rules:

equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
and(true, false) → false
and(true, true) → true
equal_int(pos(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
equal_int(neg(0), pos(0)) → true
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(false, false) → false
and(false, true) → false
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
plus_nat(s(x), y) → s(plus_nat(x, y))
if(false, u, v) → v
if(true, u, v) → u
plus_nat(0, x) → x
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

plus_int(pos(x0), neg(x1))
plus_int(neg(x0), pos(x1))
plus_int(neg(x0), neg(x1))
plus_int(pos(x0), pos(x1))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ UsableRulesProof
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ UsableRulesProof
                                                                                          ↳ QDP
                                                                                            ↳ Rewriting
                                                                                              ↳ QDP
                                                                                                ↳ UsableRulesProof
                                                                                                  ↳ QDP
                                                                                                    ↳ QReductionProof
                                                                                                      ↳ QDP
                                                                                                        ↳ Rewriting
                                                                                                          ↳ QDP
                                                                                                            ↳ UsableRulesProof
                                                                                                              ↳ QDP
                                                                                                                ↳ QReductionProof
QDP
                                                                                                                    ↳ Rewriting

Q DP problem:
The TRS P consists of the following rules:

MINUS(y0, neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(y0, minus_nat(s(0), x1))), y0, neg(x1))
MINUS(y0, neg(s(x0))) → MINUSNAT(and(false, equal_int(y0, minus_nat(0, x0))), y0, neg(s(x0)))
MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, pos(s(0)))), y0, neg(0))
MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(s(x0)))), y0, pos(x0))
MINUSNAT(true, neg(x0), y1) → MINUS(neg(x0), if(equal_int(neg(mod_nat(x0, s(s(0)))), pos(0)), neg(x0), minus_nat(s(0), x0)))
MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(pos(mod_nat(x1, s(s(0)))), pos(0)), pos(x1), pos(plus_nat(s(0), x1))))

The TRS R consists of the following rules:

equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
and(true, false) → false
and(true, true) → true
equal_int(pos(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
equal_int(neg(0), pos(0)) → true
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(false, false) → false
and(false, true) → false
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
plus_nat(s(x), y) → s(plus_nat(x, y))
if(false, u, v) → v
if(true, u, v) → u
plus_nat(0, x) → x
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
By rewriting [LPAR04] the rule MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(pos(mod_nat(x1, s(s(0)))), pos(0)), pos(x1), pos(plus_nat(s(0), x1)))) at position [1,2,0] we obtained the following new rules [LPAR04]:

MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(pos(mod_nat(x1, s(s(0)))), pos(0)), pos(x1), pos(s(plus_nat(0, x1)))))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ UsableRulesProof
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ UsableRulesProof
                                                                                          ↳ QDP
                                                                                            ↳ Rewriting
                                                                                              ↳ QDP
                                                                                                ↳ UsableRulesProof
                                                                                                  ↳ QDP
                                                                                                    ↳ QReductionProof
                                                                                                      ↳ QDP
                                                                                                        ↳ Rewriting
                                                                                                          ↳ QDP
                                                                                                            ↳ UsableRulesProof
                                                                                                              ↳ QDP
                                                                                                                ↳ QReductionProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Rewriting
QDP
                                                                                                                        ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

MINUS(y0, neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(y0, minus_nat(s(0), x1))), y0, neg(x1))
MINUS(y0, neg(s(x0))) → MINUSNAT(and(false, equal_int(y0, minus_nat(0, x0))), y0, neg(s(x0)))
MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, pos(s(0)))), y0, neg(0))
MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(s(x0)))), y0, pos(x0))
MINUSNAT(true, neg(x0), y1) → MINUS(neg(x0), if(equal_int(neg(mod_nat(x0, s(s(0)))), pos(0)), neg(x0), minus_nat(s(0), x0)))
MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(pos(mod_nat(x1, s(s(0)))), pos(0)), pos(x1), pos(s(plus_nat(0, x1)))))

The TRS R consists of the following rules:

equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
and(true, false) → false
and(true, true) → true
equal_int(pos(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
equal_int(neg(0), pos(0)) → true
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(false, false) → false
and(false, true) → false
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
plus_nat(s(x), y) → s(plus_nat(x, y))
if(false, u, v) → v
if(true, u, v) → u
plus_nat(0, x) → x
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ UsableRulesProof
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ UsableRulesProof
                                                                                          ↳ QDP
                                                                                            ↳ Rewriting
                                                                                              ↳ QDP
                                                                                                ↳ UsableRulesProof
                                                                                                  ↳ QDP
                                                                                                    ↳ QReductionProof
                                                                                                      ↳ QDP
                                                                                                        ↳ Rewriting
                                                                                                          ↳ QDP
                                                                                                            ↳ UsableRulesProof
                                                                                                              ↳ QDP
                                                                                                                ↳ QReductionProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Rewriting
                                                                                                                      ↳ QDP
                                                                                                                        ↳ UsableRulesProof
QDP
                                                                                                                            ↳ Rewriting

Q DP problem:
The TRS P consists of the following rules:

MINUS(y0, neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(y0, minus_nat(s(0), x1))), y0, neg(x1))
MINUS(y0, neg(s(x0))) → MINUSNAT(and(false, equal_int(y0, minus_nat(0, x0))), y0, neg(s(x0)))
MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, pos(s(0)))), y0, neg(0))
MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(s(x0)))), y0, pos(x0))
MINUSNAT(true, neg(x0), y1) → MINUS(neg(x0), if(equal_int(neg(mod_nat(x0, s(s(0)))), pos(0)), neg(x0), minus_nat(s(0), x0)))
MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(pos(mod_nat(x1, s(s(0)))), pos(0)), pos(x1), pos(s(plus_nat(0, x1)))))

The TRS R consists of the following rules:

greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(pos(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
equal_int(neg(0), pos(0)) → true
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(true, false) → false
and(true, true) → true
and(false, false) → false
and(false, true) → false
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if(false, u, v) → v
if(true, u, v) → u
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y
plus_nat(0, x) → x

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
By rewriting [LPAR04] the rule MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(pos(mod_nat(x1, s(s(0)))), pos(0)), pos(x1), pos(s(plus_nat(0, x1))))) at position [1,2,0,0] we obtained the following new rules [LPAR04]:

MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(pos(mod_nat(x1, s(s(0)))), pos(0)), pos(x1), pos(s(x1))))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ UsableRulesProof
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ UsableRulesProof
                                                                                          ↳ QDP
                                                                                            ↳ Rewriting
                                                                                              ↳ QDP
                                                                                                ↳ UsableRulesProof
                                                                                                  ↳ QDP
                                                                                                    ↳ QReductionProof
                                                                                                      ↳ QDP
                                                                                                        ↳ Rewriting
                                                                                                          ↳ QDP
                                                                                                            ↳ UsableRulesProof
                                                                                                              ↳ QDP
                                                                                                                ↳ QReductionProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Rewriting
                                                                                                                      ↳ QDP
                                                                                                                        ↳ UsableRulesProof
                                                                                                                          ↳ QDP
                                                                                                                            ↳ Rewriting
QDP
                                                                                                                                ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

MINUS(y0, neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(y0, minus_nat(s(0), x1))), y0, neg(x1))
MINUS(y0, neg(s(x0))) → MINUSNAT(and(false, equal_int(y0, minus_nat(0, x0))), y0, neg(s(x0)))
MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, pos(s(0)))), y0, neg(0))
MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(s(x0)))), y0, pos(x0))
MINUSNAT(true, neg(x0), y1) → MINUS(neg(x0), if(equal_int(neg(mod_nat(x0, s(s(0)))), pos(0)), neg(x0), minus_nat(s(0), x0)))
MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(pos(mod_nat(x1, s(s(0)))), pos(0)), pos(x1), pos(s(x1))))

The TRS R consists of the following rules:

greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(pos(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
equal_int(neg(0), pos(0)) → true
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(true, false) → false
and(true, true) → true
and(false, false) → false
and(false, true) → false
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if(false, u, v) → v
if(true, u, v) → u
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y
plus_nat(0, x) → x

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ UsableRulesProof
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ UsableRulesProof
                                                                                          ↳ QDP
                                                                                            ↳ Rewriting
                                                                                              ↳ QDP
                                                                                                ↳ UsableRulesProof
                                                                                                  ↳ QDP
                                                                                                    ↳ QReductionProof
                                                                                                      ↳ QDP
                                                                                                        ↳ Rewriting
                                                                                                          ↳ QDP
                                                                                                            ↳ UsableRulesProof
                                                                                                              ↳ QDP
                                                                                                                ↳ QReductionProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Rewriting
                                                                                                                      ↳ QDP
                                                                                                                        ↳ UsableRulesProof
                                                                                                                          ↳ QDP
                                                                                                                            ↳ Rewriting
                                                                                                                              ↳ QDP
                                                                                                                                ↳ UsableRulesProof
QDP
                                                                                                                                    ↳ QReductionProof

Q DP problem:
The TRS P consists of the following rules:

MINUS(y0, neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(y0, minus_nat(s(0), x1))), y0, neg(x1))
MINUS(y0, neg(s(x0))) → MINUSNAT(and(false, equal_int(y0, minus_nat(0, x0))), y0, neg(s(x0)))
MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, pos(s(0)))), y0, neg(0))
MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(s(x0)))), y0, pos(x0))
MINUSNAT(true, neg(x0), y1) → MINUS(neg(x0), if(equal_int(neg(mod_nat(x0, s(s(0)))), pos(0)), neg(x0), minus_nat(s(0), x0)))
MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(pos(mod_nat(x1, s(s(0)))), pos(0)), pos(x1), pos(s(x1))))

The TRS R consists of the following rules:

greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(pos(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
equal_int(neg(0), pos(0)) → true
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(true, false) → false
and(true, true) → true
and(false, false) → false
and(false, true) → false
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if(false, u, v) → v
if(true, u, v) → u
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
plus_nat(0, x0)
plus_nat(s(x0), x1)
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

plus_nat(0, x0)
plus_nat(s(x0), x1)



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ UsableRulesProof
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ UsableRulesProof
                                                                                          ↳ QDP
                                                                                            ↳ Rewriting
                                                                                              ↳ QDP
                                                                                                ↳ UsableRulesProof
                                                                                                  ↳ QDP
                                                                                                    ↳ QReductionProof
                                                                                                      ↳ QDP
                                                                                                        ↳ Rewriting
                                                                                                          ↳ QDP
                                                                                                            ↳ UsableRulesProof
                                                                                                              ↳ QDP
                                                                                                                ↳ QReductionProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Rewriting
                                                                                                                      ↳ QDP
                                                                                                                        ↳ UsableRulesProof
                                                                                                                          ↳ QDP
                                                                                                                            ↳ Rewriting
                                                                                                                              ↳ QDP
                                                                                                                                ↳ UsableRulesProof
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ QReductionProof
QDP
                                                                                                                                        ↳ Instantiation

Q DP problem:
The TRS P consists of the following rules:

MINUS(y0, neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(y0, minus_nat(s(0), x1))), y0, neg(x1))
MINUS(y0, neg(s(x0))) → MINUSNAT(and(false, equal_int(y0, minus_nat(0, x0))), y0, neg(s(x0)))
MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, pos(s(0)))), y0, neg(0))
MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(s(x0)))), y0, pos(x0))
MINUSNAT(true, neg(x0), y1) → MINUS(neg(x0), if(equal_int(neg(mod_nat(x0, s(s(0)))), pos(0)), neg(x0), minus_nat(s(0), x0)))
MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(pos(mod_nat(x1, s(s(0)))), pos(0)), pos(x1), pos(s(x1))))

The TRS R consists of the following rules:

greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(pos(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
equal_int(neg(0), pos(0)) → true
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(true, false) → false
and(true, true) → true
and(false, false) → false
and(false, true) → false
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if(false, u, v) → v
if(true, u, v) → u
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
By instantiating [LPAR04] the rule MINUS(y0, neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(y0, minus_nat(s(0), x1))), y0, neg(x1)) we obtained the following new rules [LPAR04]:

MINUS(neg(z0), neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(neg(z0), minus_nat(s(0), x1))), neg(z0), neg(x1))
MINUS(pos(z0), neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(pos(z0), minus_nat(s(0), x1))), pos(z0), neg(x1))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ UsableRulesProof
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ UsableRulesProof
                                                                                          ↳ QDP
                                                                                            ↳ Rewriting
                                                                                              ↳ QDP
                                                                                                ↳ UsableRulesProof
                                                                                                  ↳ QDP
                                                                                                    ↳ QReductionProof
                                                                                                      ↳ QDP
                                                                                                        ↳ Rewriting
                                                                                                          ↳ QDP
                                                                                                            ↳ UsableRulesProof
                                                                                                              ↳ QDP
                                                                                                                ↳ QReductionProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Rewriting
                                                                                                                      ↳ QDP
                                                                                                                        ↳ UsableRulesProof
                                                                                                                          ↳ QDP
                                                                                                                            ↳ Rewriting
                                                                                                                              ↳ QDP
                                                                                                                                ↳ UsableRulesProof
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ QReductionProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Instantiation
QDP
                                                                                                                                            ↳ Instantiation

Q DP problem:
The TRS P consists of the following rules:

MINUS(y0, neg(s(x0))) → MINUSNAT(and(false, equal_int(y0, minus_nat(0, x0))), y0, neg(s(x0)))
MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, pos(s(0)))), y0, neg(0))
MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(s(x0)))), y0, pos(x0))
MINUSNAT(true, neg(x0), y1) → MINUS(neg(x0), if(equal_int(neg(mod_nat(x0, s(s(0)))), pos(0)), neg(x0), minus_nat(s(0), x0)))
MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(pos(mod_nat(x1, s(s(0)))), pos(0)), pos(x1), pos(s(x1))))
MINUS(neg(z0), neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(neg(z0), minus_nat(s(0), x1))), neg(z0), neg(x1))
MINUS(pos(z0), neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(pos(z0), minus_nat(s(0), x1))), pos(z0), neg(x1))

The TRS R consists of the following rules:

greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(pos(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
equal_int(neg(0), pos(0)) → true
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(true, false) → false
and(true, true) → true
and(false, false) → false
and(false, true) → false
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if(false, u, v) → v
if(true, u, v) → u
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
By instantiating [LPAR04] the rule MINUS(y0, neg(s(x0))) → MINUSNAT(and(false, equal_int(y0, minus_nat(0, x0))), y0, neg(s(x0))) we obtained the following new rules [LPAR04]:

MINUS(neg(z0), neg(s(x1))) → MINUSNAT(and(false, equal_int(neg(z0), minus_nat(0, x1))), neg(z0), neg(s(x1)))
MINUS(pos(z0), neg(s(x1))) → MINUSNAT(and(false, equal_int(pos(z0), minus_nat(0, x1))), pos(z0), neg(s(x1)))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ UsableRulesProof
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ UsableRulesProof
                                                                                          ↳ QDP
                                                                                            ↳ Rewriting
                                                                                              ↳ QDP
                                                                                                ↳ UsableRulesProof
                                                                                                  ↳ QDP
                                                                                                    ↳ QReductionProof
                                                                                                      ↳ QDP
                                                                                                        ↳ Rewriting
                                                                                                          ↳ QDP
                                                                                                            ↳ UsableRulesProof
                                                                                                              ↳ QDP
                                                                                                                ↳ QReductionProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Rewriting
                                                                                                                      ↳ QDP
                                                                                                                        ↳ UsableRulesProof
                                                                                                                          ↳ QDP
                                                                                                                            ↳ Rewriting
                                                                                                                              ↳ QDP
                                                                                                                                ↳ UsableRulesProof
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ QReductionProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Instantiation
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ Instantiation
QDP
                                                                                                                                                ↳ Instantiation

Q DP problem:
The TRS P consists of the following rules:

MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, pos(s(0)))), y0, neg(0))
MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(s(x0)))), y0, pos(x0))
MINUSNAT(true, neg(x0), y1) → MINUS(neg(x0), if(equal_int(neg(mod_nat(x0, s(s(0)))), pos(0)), neg(x0), minus_nat(s(0), x0)))
MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(pos(mod_nat(x1, s(s(0)))), pos(0)), pos(x1), pos(s(x1))))
MINUS(neg(z0), neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(neg(z0), minus_nat(s(0), x1))), neg(z0), neg(x1))
MINUS(pos(z0), neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(pos(z0), minus_nat(s(0), x1))), pos(z0), neg(x1))
MINUS(neg(z0), neg(s(x1))) → MINUSNAT(and(false, equal_int(neg(z0), minus_nat(0, x1))), neg(z0), neg(s(x1)))
MINUS(pos(z0), neg(s(x1))) → MINUSNAT(and(false, equal_int(pos(z0), minus_nat(0, x1))), pos(z0), neg(s(x1)))

The TRS R consists of the following rules:

greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(pos(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
equal_int(neg(0), pos(0)) → true
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(true, false) → false
and(true, true) → true
and(false, false) → false
and(false, true) → false
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if(false, u, v) → v
if(true, u, v) → u
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
By instantiating [LPAR04] the rule MINUS(y0, neg(0)) → MINUSNAT(and(true, equal_int(y0, pos(s(0)))), y0, neg(0)) we obtained the following new rules [LPAR04]:

MINUS(pos(z0), neg(0)) → MINUSNAT(and(true, equal_int(pos(z0), pos(s(0)))), pos(z0), neg(0))
MINUS(neg(z0), neg(0)) → MINUSNAT(and(true, equal_int(neg(z0), pos(s(0)))), neg(z0), neg(0))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ UsableRulesProof
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ UsableRulesProof
                                                                                          ↳ QDP
                                                                                            ↳ Rewriting
                                                                                              ↳ QDP
                                                                                                ↳ UsableRulesProof
                                                                                                  ↳ QDP
                                                                                                    ↳ QReductionProof
                                                                                                      ↳ QDP
                                                                                                        ↳ Rewriting
                                                                                                          ↳ QDP
                                                                                                            ↳ UsableRulesProof
                                                                                                              ↳ QDP
                                                                                                                ↳ QReductionProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Rewriting
                                                                                                                      ↳ QDP
                                                                                                                        ↳ UsableRulesProof
                                                                                                                          ↳ QDP
                                                                                                                            ↳ Rewriting
                                                                                                                              ↳ QDP
                                                                                                                                ↳ UsableRulesProof
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ QReductionProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Instantiation
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ Instantiation
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Instantiation
QDP
                                                                                                                                                    ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(s(x0)))), y0, pos(x0))
MINUSNAT(true, neg(x0), y1) → MINUS(neg(x0), if(equal_int(neg(mod_nat(x0, s(s(0)))), pos(0)), neg(x0), minus_nat(s(0), x0)))
MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(pos(mod_nat(x1, s(s(0)))), pos(0)), pos(x1), pos(s(x1))))
MINUS(neg(z0), neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(neg(z0), minus_nat(s(0), x1))), neg(z0), neg(x1))
MINUS(pos(z0), neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(pos(z0), minus_nat(s(0), x1))), pos(z0), neg(x1))
MINUS(neg(z0), neg(s(x1))) → MINUSNAT(and(false, equal_int(neg(z0), minus_nat(0, x1))), neg(z0), neg(s(x1)))
MINUS(pos(z0), neg(s(x1))) → MINUSNAT(and(false, equal_int(pos(z0), minus_nat(0, x1))), pos(z0), neg(s(x1)))
MINUS(pos(z0), neg(0)) → MINUSNAT(and(true, equal_int(pos(z0), pos(s(0)))), pos(z0), neg(0))
MINUS(neg(z0), neg(0)) → MINUSNAT(and(true, equal_int(neg(z0), pos(s(0)))), neg(z0), neg(0))

The TRS R consists of the following rules:

greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(pos(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
equal_int(neg(0), pos(0)) → true
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(true, false) → false
and(true, true) → true
and(false, false) → false
and(false, true) → false
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if(false, u, v) → v
if(true, u, v) → u
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
By narrowing [LPAR04] the rule MINUS(neg(z0), neg(0)) → MINUSNAT(and(true, equal_int(neg(z0), pos(s(0)))), neg(z0), neg(0)) at position [0] we obtained the following new rules [LPAR04]:

MINUS(neg(s(x0)), neg(0)) → MINUSNAT(and(true, false), neg(s(x0)), neg(0))
MINUS(neg(0), neg(0)) → MINUSNAT(and(true, false), neg(0), neg(0))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ UsableRulesProof
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ UsableRulesProof
                                                                                          ↳ QDP
                                                                                            ↳ Rewriting
                                                                                              ↳ QDP
                                                                                                ↳ UsableRulesProof
                                                                                                  ↳ QDP
                                                                                                    ↳ QReductionProof
                                                                                                      ↳ QDP
                                                                                                        ↳ Rewriting
                                                                                                          ↳ QDP
                                                                                                            ↳ UsableRulesProof
                                                                                                              ↳ QDP
                                                                                                                ↳ QReductionProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Rewriting
                                                                                                                      ↳ QDP
                                                                                                                        ↳ UsableRulesProof
                                                                                                                          ↳ QDP
                                                                                                                            ↳ Rewriting
                                                                                                                              ↳ QDP
                                                                                                                                ↳ UsableRulesProof
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ QReductionProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Instantiation
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ Instantiation
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Instantiation
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ Narrowing
QDP
                                                                                                                                                        ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(s(x0)))), y0, pos(x0))
MINUSNAT(true, neg(x0), y1) → MINUS(neg(x0), if(equal_int(neg(mod_nat(x0, s(s(0)))), pos(0)), neg(x0), minus_nat(s(0), x0)))
MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(pos(mod_nat(x1, s(s(0)))), pos(0)), pos(x1), pos(s(x1))))
MINUS(neg(z0), neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(neg(z0), minus_nat(s(0), x1))), neg(z0), neg(x1))
MINUS(pos(z0), neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(pos(z0), minus_nat(s(0), x1))), pos(z0), neg(x1))
MINUS(neg(z0), neg(s(x1))) → MINUSNAT(and(false, equal_int(neg(z0), minus_nat(0, x1))), neg(z0), neg(s(x1)))
MINUS(pos(z0), neg(s(x1))) → MINUSNAT(and(false, equal_int(pos(z0), minus_nat(0, x1))), pos(z0), neg(s(x1)))
MINUS(pos(z0), neg(0)) → MINUSNAT(and(true, equal_int(pos(z0), pos(s(0)))), pos(z0), neg(0))
MINUS(neg(s(x0)), neg(0)) → MINUSNAT(and(true, false), neg(s(x0)), neg(0))
MINUS(neg(0), neg(0)) → MINUSNAT(and(true, false), neg(0), neg(0))

The TRS R consists of the following rules:

greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(pos(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
equal_int(neg(0), pos(0)) → true
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(true, false) → false
and(true, true) → true
and(false, false) → false
and(false, true) → false
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if(false, u, v) → v
if(true, u, v) → u
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 2 less nodes.

↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ UsableRulesProof
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ UsableRulesProof
                                                                                          ↳ QDP
                                                                                            ↳ Rewriting
                                                                                              ↳ QDP
                                                                                                ↳ UsableRulesProof
                                                                                                  ↳ QDP
                                                                                                    ↳ QReductionProof
                                                                                                      ↳ QDP
                                                                                                        ↳ Rewriting
                                                                                                          ↳ QDP
                                                                                                            ↳ UsableRulesProof
                                                                                                              ↳ QDP
                                                                                                                ↳ QReductionProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Rewriting
                                                                                                                      ↳ QDP
                                                                                                                        ↳ UsableRulesProof
                                                                                                                          ↳ QDP
                                                                                                                            ↳ Rewriting
                                                                                                                              ↳ QDP
                                                                                                                                ↳ UsableRulesProof
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ QReductionProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Instantiation
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ Instantiation
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Instantiation
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ Narrowing
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ DependencyGraphProof
QDP
                                                                                                                                                            ↳ Instantiation

Q DP problem:
The TRS P consists of the following rules:

MINUSNAT(true, neg(x0), y1) → MINUS(neg(x0), if(equal_int(neg(mod_nat(x0, s(s(0)))), pos(0)), neg(x0), minus_nat(s(0), x0)))
MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(s(x0)))), y0, pos(x0))
MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(pos(mod_nat(x1, s(s(0)))), pos(0)), pos(x1), pos(s(x1))))
MINUS(pos(z0), neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(pos(z0), minus_nat(s(0), x1))), pos(z0), neg(x1))
MINUS(pos(z0), neg(s(x1))) → MINUSNAT(and(false, equal_int(pos(z0), minus_nat(0, x1))), pos(z0), neg(s(x1)))
MINUS(pos(z0), neg(0)) → MINUSNAT(and(true, equal_int(pos(z0), pos(s(0)))), pos(z0), neg(0))
MINUS(neg(z0), neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(neg(z0), minus_nat(s(0), x1))), neg(z0), neg(x1))
MINUS(neg(z0), neg(s(x1))) → MINUSNAT(and(false, equal_int(neg(z0), minus_nat(0, x1))), neg(z0), neg(s(x1)))

The TRS R consists of the following rules:

greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(pos(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
equal_int(neg(0), pos(0)) → true
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(true, false) → false
and(true, true) → true
and(false, false) → false
and(false, true) → false
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if(false, u, v) → v
if(true, u, v) → u
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
By instantiating [LPAR04] the rule MINUSNAT(true, neg(x0), y1) → MINUS(neg(x0), if(equal_int(neg(mod_nat(x0, s(s(0)))), pos(0)), neg(x0), minus_nat(s(0), x0))) we obtained the following new rules [LPAR04]:

MINUSNAT(true, neg(z0), neg(z1)) → MINUS(neg(z0), if(equal_int(neg(mod_nat(z0, s(s(0)))), pos(0)), neg(z0), minus_nat(s(0), z0)))
MINUSNAT(true, neg(x0), pos(z1)) → MINUS(neg(x0), if(equal_int(neg(mod_nat(x0, s(s(0)))), pos(0)), neg(x0), minus_nat(s(0), x0)))
MINUSNAT(true, neg(z0), neg(s(z1))) → MINUS(neg(z0), if(equal_int(neg(mod_nat(z0, s(s(0)))), pos(0)), neg(z0), minus_nat(s(0), z0)))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ UsableRulesProof
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ UsableRulesProof
                                                                                          ↳ QDP
                                                                                            ↳ Rewriting
                                                                                              ↳ QDP
                                                                                                ↳ UsableRulesProof
                                                                                                  ↳ QDP
                                                                                                    ↳ QReductionProof
                                                                                                      ↳ QDP
                                                                                                        ↳ Rewriting
                                                                                                          ↳ QDP
                                                                                                            ↳ UsableRulesProof
                                                                                                              ↳ QDP
                                                                                                                ↳ QReductionProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Rewriting
                                                                                                                      ↳ QDP
                                                                                                                        ↳ UsableRulesProof
                                                                                                                          ↳ QDP
                                                                                                                            ↳ Rewriting
                                                                                                                              ↳ QDP
                                                                                                                                ↳ UsableRulesProof
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ QReductionProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Instantiation
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ Instantiation
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Instantiation
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ Narrowing
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ DependencyGraphProof
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ Instantiation
QDP
                                                                                                                                                                ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(s(x0)))), y0, pos(x0))
MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(pos(mod_nat(x1, s(s(0)))), pos(0)), pos(x1), pos(s(x1))))
MINUS(pos(z0), neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(pos(z0), minus_nat(s(0), x1))), pos(z0), neg(x1))
MINUS(pos(z0), neg(s(x1))) → MINUSNAT(and(false, equal_int(pos(z0), minus_nat(0, x1))), pos(z0), neg(s(x1)))
MINUS(pos(z0), neg(0)) → MINUSNAT(and(true, equal_int(pos(z0), pos(s(0)))), pos(z0), neg(0))
MINUS(neg(z0), neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(neg(z0), minus_nat(s(0), x1))), neg(z0), neg(x1))
MINUS(neg(z0), neg(s(x1))) → MINUSNAT(and(false, equal_int(neg(z0), minus_nat(0, x1))), neg(z0), neg(s(x1)))
MINUSNAT(true, neg(z0), neg(z1)) → MINUS(neg(z0), if(equal_int(neg(mod_nat(z0, s(s(0)))), pos(0)), neg(z0), minus_nat(s(0), z0)))
MINUSNAT(true, neg(x0), pos(z1)) → MINUS(neg(x0), if(equal_int(neg(mod_nat(x0, s(s(0)))), pos(0)), neg(x0), minus_nat(s(0), x0)))
MINUSNAT(true, neg(z0), neg(s(z1))) → MINUS(neg(z0), if(equal_int(neg(mod_nat(z0, s(s(0)))), pos(0)), neg(z0), minus_nat(s(0), z0)))

The TRS R consists of the following rules:

greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(pos(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
equal_int(neg(0), pos(0)) → true
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(true, false) → false
and(true, true) → true
and(false, false) → false
and(false, true) → false
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if(false, u, v) → v
if(true, u, v) → u
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
By narrowing [LPAR04] the rule MINUS(y0, pos(x0)) → MINUSNAT(and(true, equal_int(y0, pos(s(x0)))), y0, pos(x0)) at position [0] we obtained the following new rules [LPAR04]:

MINUS(neg(s(x0)), pos(x1)) → MINUSNAT(and(true, false), neg(s(x0)), pos(x1))
MINUS(pos(0), pos(x0)) → MINUSNAT(and(true, false), pos(0), pos(x0))
MINUS(pos(s(x0)), pos(x1)) → MINUSNAT(and(true, equal_int(pos(x0), pos(x1))), pos(s(x0)), pos(x1))
MINUS(neg(0), pos(x0)) → MINUSNAT(and(true, false), neg(0), pos(x0))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ UsableRulesProof
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ UsableRulesProof
                                                                                          ↳ QDP
                                                                                            ↳ Rewriting
                                                                                              ↳ QDP
                                                                                                ↳ UsableRulesProof
                                                                                                  ↳ QDP
                                                                                                    ↳ QReductionProof
                                                                                                      ↳ QDP
                                                                                                        ↳ Rewriting
                                                                                                          ↳ QDP
                                                                                                            ↳ UsableRulesProof
                                                                                                              ↳ QDP
                                                                                                                ↳ QReductionProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Rewriting
                                                                                                                      ↳ QDP
                                                                                                                        ↳ UsableRulesProof
                                                                                                                          ↳ QDP
                                                                                                                            ↳ Rewriting
                                                                                                                              ↳ QDP
                                                                                                                                ↳ UsableRulesProof
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ QReductionProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Instantiation
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ Instantiation
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Instantiation
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ Narrowing
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ DependencyGraphProof
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ Instantiation
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
QDP
                                                                                                                                                                    ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(pos(mod_nat(x1, s(s(0)))), pos(0)), pos(x1), pos(s(x1))))
MINUS(pos(z0), neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(pos(z0), minus_nat(s(0), x1))), pos(z0), neg(x1))
MINUS(pos(z0), neg(s(x1))) → MINUSNAT(and(false, equal_int(pos(z0), minus_nat(0, x1))), pos(z0), neg(s(x1)))
MINUS(pos(z0), neg(0)) → MINUSNAT(and(true, equal_int(pos(z0), pos(s(0)))), pos(z0), neg(0))
MINUS(neg(z0), neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(neg(z0), minus_nat(s(0), x1))), neg(z0), neg(x1))
MINUS(neg(z0), neg(s(x1))) → MINUSNAT(and(false, equal_int(neg(z0), minus_nat(0, x1))), neg(z0), neg(s(x1)))
MINUSNAT(true, neg(z0), neg(z1)) → MINUS(neg(z0), if(equal_int(neg(mod_nat(z0, s(s(0)))), pos(0)), neg(z0), minus_nat(s(0), z0)))
MINUSNAT(true, neg(x0), pos(z1)) → MINUS(neg(x0), if(equal_int(neg(mod_nat(x0, s(s(0)))), pos(0)), neg(x0), minus_nat(s(0), x0)))
MINUSNAT(true, neg(z0), neg(s(z1))) → MINUS(neg(z0), if(equal_int(neg(mod_nat(z0, s(s(0)))), pos(0)), neg(z0), minus_nat(s(0), z0)))
MINUS(neg(s(x0)), pos(x1)) → MINUSNAT(and(true, false), neg(s(x0)), pos(x1))
MINUS(pos(0), pos(x0)) → MINUSNAT(and(true, false), pos(0), pos(x0))
MINUS(pos(s(x0)), pos(x1)) → MINUSNAT(and(true, equal_int(pos(x0), pos(x1))), pos(s(x0)), pos(x1))
MINUS(neg(0), pos(x0)) → MINUSNAT(and(true, false), neg(0), pos(x0))

The TRS R consists of the following rules:

greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(pos(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
equal_int(neg(0), pos(0)) → true
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(true, false) → false
and(true, true) → true
and(false, false) → false
and(false, true) → false
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if(false, u, v) → v
if(true, u, v) → u
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 2 SCCs with 4 less nodes.

↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ UsableRulesProof
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ UsableRulesProof
                                                                                          ↳ QDP
                                                                                            ↳ Rewriting
                                                                                              ↳ QDP
                                                                                                ↳ UsableRulesProof
                                                                                                  ↳ QDP
                                                                                                    ↳ QReductionProof
                                                                                                      ↳ QDP
                                                                                                        ↳ Rewriting
                                                                                                          ↳ QDP
                                                                                                            ↳ UsableRulesProof
                                                                                                              ↳ QDP
                                                                                                                ↳ QReductionProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Rewriting
                                                                                                                      ↳ QDP
                                                                                                                        ↳ UsableRulesProof
                                                                                                                          ↳ QDP
                                                                                                                            ↳ Rewriting
                                                                                                                              ↳ QDP
                                                                                                                                ↳ UsableRulesProof
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ QReductionProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Instantiation
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ Instantiation
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Instantiation
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ Narrowing
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ DependencyGraphProof
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ Instantiation
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ AND
QDP
                                                                                                                                                                          ↳ UsableRulesProof
                                                                                                                                                                        ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

MINUSNAT(true, neg(z0), neg(z1)) → MINUS(neg(z0), if(equal_int(neg(mod_nat(z0, s(s(0)))), pos(0)), neg(z0), minus_nat(s(0), z0)))
MINUS(neg(z0), neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(neg(z0), minus_nat(s(0), x1))), neg(z0), neg(x1))
MINUSNAT(true, neg(z0), neg(s(z1))) → MINUS(neg(z0), if(equal_int(neg(mod_nat(z0, s(s(0)))), pos(0)), neg(z0), minus_nat(s(0), z0)))
MINUS(neg(z0), neg(s(x1))) → MINUSNAT(and(false, equal_int(neg(z0), minus_nat(0, x1))), neg(z0), neg(s(x1)))

The TRS R consists of the following rules:

greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(pos(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
equal_int(neg(0), pos(0)) → true
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(true, false) → false
and(true, true) → true
and(false, false) → false
and(false, true) → false
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if(false, u, v) → v
if(true, u, v) → u
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ UsableRulesProof
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ UsableRulesProof
                                                                                          ↳ QDP
                                                                                            ↳ Rewriting
                                                                                              ↳ QDP
                                                                                                ↳ UsableRulesProof
                                                                                                  ↳ QDP
                                                                                                    ↳ QReductionProof
                                                                                                      ↳ QDP
                                                                                                        ↳ Rewriting
                                                                                                          ↳ QDP
                                                                                                            ↳ UsableRulesProof
                                                                                                              ↳ QDP
                                                                                                                ↳ QReductionProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Rewriting
                                                                                                                      ↳ QDP
                                                                                                                        ↳ UsableRulesProof
                                                                                                                          ↳ QDP
                                                                                                                            ↳ Rewriting
                                                                                                                              ↳ QDP
                                                                                                                                ↳ UsableRulesProof
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ QReductionProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Instantiation
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ Instantiation
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Instantiation
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ Narrowing
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ DependencyGraphProof
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ Instantiation
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ AND
                                                                                                                                                                        ↳ QDP
                                                                                                                                                                          ↳ UsableRulesProof
QDP
                                                                                                                                                                              ↳ QDPOrderProof
                                                                                                                                                                        ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

MINUSNAT(true, neg(z0), neg(z1)) → MINUS(neg(z0), if(equal_int(neg(mod_nat(z0, s(s(0)))), pos(0)), neg(z0), minus_nat(s(0), z0)))
MINUS(neg(z0), neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(neg(z0), minus_nat(s(0), x1))), neg(z0), neg(x1))
MINUSNAT(true, neg(z0), neg(s(z1))) → MINUS(neg(z0), if(equal_int(neg(mod_nat(z0, s(s(0)))), pos(0)), neg(z0), minus_nat(s(0), z0)))
MINUS(neg(z0), neg(s(x1))) → MINUSNAT(and(false, equal_int(neg(z0), minus_nat(0, x1))), neg(z0), neg(s(x1)))

The TRS R consists of the following rules:

greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
equal_int(neg(0), pos(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(neg(0), pos(0)) → true
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(neg(0), neg(s(y))) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(true, false) → false
and(true, true) → true
and(false, false) → false
and(false, true) → false
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if(false, u, v) → v
if(true, u, v) → u
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


MINUS(neg(z0), neg(s(x1))) → MINUSNAT(and(false, equal_int(neg(z0), minus_nat(0, x1))), neg(z0), neg(s(x1)))
The remaining pairs can at least be oriented weakly.

MINUSNAT(true, neg(z0), neg(z1)) → MINUS(neg(z0), if(equal_int(neg(mod_nat(z0, s(s(0)))), pos(0)), neg(z0), minus_nat(s(0), z0)))
MINUS(neg(z0), neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(neg(z0), minus_nat(s(0), x1))), neg(z0), neg(x1))
MINUSNAT(true, neg(z0), neg(s(z1))) → MINUS(neg(z0), if(equal_int(neg(mod_nat(z0, s(s(0)))), pos(0)), neg(z0), minus_nat(s(0), z0)))
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(MINUS(x1, x2)) = 1   
POL(MINUSNAT(x1, x2, x3)) = x1   
POL(and(x1, x2)) = x1   
POL(equal_int(x1, x2)) = 0   
POL(false) = 0   
POL(greatereq_int(x1, x2)) = 1   
POL(if(x1, x2, x3)) = 0   
POL(if1(x1, x2, x3)) = 0   
POL(minus_nat(x1, x2)) = 0   
POL(minus_nat_s(x1, x2)) = 0   
POL(mod_nat(x1, x2)) = 0   
POL(neg(x1)) = 0   
POL(pos(x1)) = 0   
POL(s(x1)) = 0   
POL(true) = 1   

The following usable rules [FROCOS05] were oriented:

greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
and(true, true) → true
and(true, false) → false
and(false, true) → false
and(false, false) → false



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ UsableRulesProof
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ UsableRulesProof
                                                                                          ↳ QDP
                                                                                            ↳ Rewriting
                                                                                              ↳ QDP
                                                                                                ↳ UsableRulesProof
                                                                                                  ↳ QDP
                                                                                                    ↳ QReductionProof
                                                                                                      ↳ QDP
                                                                                                        ↳ Rewriting
                                                                                                          ↳ QDP
                                                                                                            ↳ UsableRulesProof
                                                                                                              ↳ QDP
                                                                                                                ↳ QReductionProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Rewriting
                                                                                                                      ↳ QDP
                                                                                                                        ↳ UsableRulesProof
                                                                                                                          ↳ QDP
                                                                                                                            ↳ Rewriting
                                                                                                                              ↳ QDP
                                                                                                                                ↳ UsableRulesProof
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ QReductionProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Instantiation
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ Instantiation
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Instantiation
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ Narrowing
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ DependencyGraphProof
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ Instantiation
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ AND
                                                                                                                                                                        ↳ QDP
                                                                                                                                                                          ↳ UsableRulesProof
                                                                                                                                                                            ↳ QDP
                                                                                                                                                                              ↳ QDPOrderProof
QDP
                                                                                                                                                                                  ↳ RemovalProof
                                                                                                                                                                                  ↳ RemovalProof
                                                                                                                                                                        ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

MINUSNAT(true, neg(z0), neg(z1)) → MINUS(neg(z0), if(equal_int(neg(mod_nat(z0, s(s(0)))), pos(0)), neg(z0), minus_nat(s(0), z0)))
MINUS(neg(z0), neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(neg(z0), minus_nat(s(0), x1))), neg(z0), neg(x1))
MINUSNAT(true, neg(z0), neg(s(z1))) → MINUS(neg(z0), if(equal_int(neg(mod_nat(z0, s(s(0)))), pos(0)), neg(z0), minus_nat(s(0), z0)))

The TRS R consists of the following rules:

greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
equal_int(neg(0), pos(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(neg(0), pos(0)) → true
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(neg(0), neg(s(y))) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(true, false) → false
and(true, true) → true
and(false, false) → false
and(false, true) → false
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if(false, u, v) → v
if(true, u, v) → u
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
In the following pairs the term without variables s(s(0)) is replaced by the fresh variable x_removed.
Pair: MINUSNAT(true, neg(z0), neg(z1)) → MINUS(neg(z0), if(equal_int(neg(mod_nat(z0, s(s(0)))), pos(0)), neg(z0), minus_nat(s(0), z0)))
Positions in right side of the pair: Pair: MINUSNAT(true, neg(z0), neg(s(z1))) → MINUS(neg(z0), if(equal_int(neg(mod_nat(z0, s(s(0)))), pos(0)), neg(z0), minus_nat(s(0), z0)))
Positions in right side of the pair: The new variable was added to all pairs as a new argument[CONREM].

↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ UsableRulesProof
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ UsableRulesProof
                                                                                          ↳ QDP
                                                                                            ↳ Rewriting
                                                                                              ↳ QDP
                                                                                                ↳ UsableRulesProof
                                                                                                  ↳ QDP
                                                                                                    ↳ QReductionProof
                                                                                                      ↳ QDP
                                                                                                        ↳ Rewriting
                                                                                                          ↳ QDP
                                                                                                            ↳ UsableRulesProof
                                                                                                              ↳ QDP
                                                                                                                ↳ QReductionProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Rewriting
                                                                                                                      ↳ QDP
                                                                                                                        ↳ UsableRulesProof
                                                                                                                          ↳ QDP
                                                                                                                            ↳ Rewriting
                                                                                                                              ↳ QDP
                                                                                                                                ↳ UsableRulesProof
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ QReductionProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Instantiation
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ Instantiation
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Instantiation
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ Narrowing
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ DependencyGraphProof
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ Instantiation
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ AND
                                                                                                                                                                        ↳ QDP
                                                                                                                                                                          ↳ UsableRulesProof
                                                                                                                                                                            ↳ QDP
                                                                                                                                                                              ↳ QDPOrderProof
                                                                                                                                                                                ↳ QDP
                                                                                                                                                                                  ↳ RemovalProof
QDP
                                                                                                                                                                                  ↳ RemovalProof
                                                                                                                                                                        ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

MINUSNAT(true, neg(z0), neg(z1), x_removed) → MINUS(neg(z0), if(equal_int(neg(mod_nat(z0, x_removed)), pos(0)), neg(z0), minus_nat(s(0), z0)), x_removed)
MINUS(neg(z0), neg(x1), x_removed) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(neg(z0), minus_nat(s(0), x1))), neg(z0), neg(x1), x_removed)
MINUSNAT(true, neg(z0), neg(s(z1)), x_removed) → MINUS(neg(z0), if(equal_int(neg(mod_nat(z0, x_removed)), pos(0)), neg(z0), minus_nat(s(0), z0)), x_removed)

The TRS R consists of the following rules:

greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
equal_int(neg(0), pos(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(neg(0), pos(0)) → true
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(neg(0), neg(s(y))) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(true, false) → false
and(true, true) → true
and(false, false) → false
and(false, true) → false
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if(false, u, v) → v
if(true, u, v) → u
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
In the following pairs the term without variables s(s(0)) is replaced by the fresh variable x_removed.
Pair: MINUSNAT(true, neg(z0), neg(z1)) → MINUS(neg(z0), if(equal_int(neg(mod_nat(z0, s(s(0)))), pos(0)), neg(z0), minus_nat(s(0), z0)))
Positions in right side of the pair: Pair: MINUSNAT(true, neg(z0), neg(s(z1))) → MINUS(neg(z0), if(equal_int(neg(mod_nat(z0, s(s(0)))), pos(0)), neg(z0), minus_nat(s(0), z0)))
Positions in right side of the pair: The new variable was added to all pairs as a new argument[CONREM].

↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ UsableRulesProof
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ UsableRulesProof
                                                                                          ↳ QDP
                                                                                            ↳ Rewriting
                                                                                              ↳ QDP
                                                                                                ↳ UsableRulesProof
                                                                                                  ↳ QDP
                                                                                                    ↳ QReductionProof
                                                                                                      ↳ QDP
                                                                                                        ↳ Rewriting
                                                                                                          ↳ QDP
                                                                                                            ↳ UsableRulesProof
                                                                                                              ↳ QDP
                                                                                                                ↳ QReductionProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Rewriting
                                                                                                                      ↳ QDP
                                                                                                                        ↳ UsableRulesProof
                                                                                                                          ↳ QDP
                                                                                                                            ↳ Rewriting
                                                                                                                              ↳ QDP
                                                                                                                                ↳ UsableRulesProof
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ QReductionProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Instantiation
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ Instantiation
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Instantiation
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ Narrowing
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ DependencyGraphProof
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ Instantiation
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ AND
                                                                                                                                                                        ↳ QDP
                                                                                                                                                                          ↳ UsableRulesProof
                                                                                                                                                                            ↳ QDP
                                                                                                                                                                              ↳ QDPOrderProof
                                                                                                                                                                                ↳ QDP
                                                                                                                                                                                  ↳ RemovalProof
                                                                                                                                                                                  ↳ RemovalProof
QDP
                                                                                                                                                                        ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

MINUSNAT(true, neg(z0), neg(z1), x_removed) → MINUS(neg(z0), if(equal_int(neg(mod_nat(z0, x_removed)), pos(0)), neg(z0), minus_nat(s(0), z0)), x_removed)
MINUS(neg(z0), neg(x1), x_removed) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(neg(z0), minus_nat(s(0), x1))), neg(z0), neg(x1), x_removed)
MINUSNAT(true, neg(z0), neg(s(z1)), x_removed) → MINUS(neg(z0), if(equal_int(neg(mod_nat(z0, x_removed)), pos(0)), neg(z0), minus_nat(s(0), z0)), x_removed)

The TRS R consists of the following rules:

greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
equal_int(neg(0), pos(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(neg(0), pos(0)) → true
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(neg(0), neg(s(y))) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(true, false) → false
and(true, true) → true
and(false, false) → false
and(false, true) → false
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if(false, u, v) → v
if(true, u, v) → u
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.

↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ UsableRulesProof
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ UsableRulesProof
                                                                                          ↳ QDP
                                                                                            ↳ Rewriting
                                                                                              ↳ QDP
                                                                                                ↳ UsableRulesProof
                                                                                                  ↳ QDP
                                                                                                    ↳ QReductionProof
                                                                                                      ↳ QDP
                                                                                                        ↳ Rewriting
                                                                                                          ↳ QDP
                                                                                                            ↳ UsableRulesProof
                                                                                                              ↳ QDP
                                                                                                                ↳ QReductionProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Rewriting
                                                                                                                      ↳ QDP
                                                                                                                        ↳ UsableRulesProof
                                                                                                                          ↳ QDP
                                                                                                                            ↳ Rewriting
                                                                                                                              ↳ QDP
                                                                                                                                ↳ UsableRulesProof
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ QReductionProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Instantiation
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ Instantiation
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Instantiation
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ Narrowing
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ DependencyGraphProof
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ Instantiation
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ AND
                                                                                                                                                                        ↳ QDP
QDP
                                                                                                                                                                          ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

MINUS(pos(z0), neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(pos(z0), minus_nat(s(0), x1))), pos(z0), neg(x1))
MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(pos(mod_nat(x1, s(s(0)))), pos(0)), pos(x1), pos(s(x1))))
MINUS(pos(z0), neg(s(x1))) → MINUSNAT(and(false, equal_int(pos(z0), minus_nat(0, x1))), pos(z0), neg(s(x1)))
MINUS(pos(z0), neg(0)) → MINUSNAT(and(true, equal_int(pos(z0), pos(s(0)))), pos(z0), neg(0))
MINUS(pos(s(x0)), pos(x1)) → MINUSNAT(and(true, equal_int(pos(x0), pos(x1))), pos(s(x0)), pos(x1))

The TRS R consists of the following rules:

greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
equal_int(pos(0), pos(s(y))) → false
equal_int(neg(0), pos(s(y))) → false
equal_int(neg(s(x)), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
equal_int(pos(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
equal_int(neg(0), pos(0)) → true
equal_int(neg(s(x)), pos(0)) → false
equal_int(neg(0), neg(0)) → true
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), neg(s(y))) → false
equal_int(neg(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(neg(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
equal_int(neg(s(x)), neg(s(y))) → equal_int(neg(x), neg(y))
and(true, false) → false
and(true, true) → true
and(false, false) → false
and(false, true) → false
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if(false, u, v) → v
if(true, u, v) → u
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ UsableRulesProof
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ UsableRulesProof
                                                                                          ↳ QDP
                                                                                            ↳ Rewriting
                                                                                              ↳ QDP
                                                                                                ↳ UsableRulesProof
                                                                                                  ↳ QDP
                                                                                                    ↳ QReductionProof
                                                                                                      ↳ QDP
                                                                                                        ↳ Rewriting
                                                                                                          ↳ QDP
                                                                                                            ↳ UsableRulesProof
                                                                                                              ↳ QDP
                                                                                                                ↳ QReductionProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Rewriting
                                                                                                                      ↳ QDP
                                                                                                                        ↳ UsableRulesProof
                                                                                                                          ↳ QDP
                                                                                                                            ↳ Rewriting
                                                                                                                              ↳ QDP
                                                                                                                                ↳ UsableRulesProof
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ QReductionProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Instantiation
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ Instantiation
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Instantiation
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ Narrowing
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ DependencyGraphProof
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ Instantiation
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ AND
                                                                                                                                                                        ↳ QDP
                                                                                                                                                                        ↳ QDP
                                                                                                                                                                          ↳ UsableRulesProof
QDP
                                                                                                                                                                              ↳ Instantiation

Q DP problem:
The TRS P consists of the following rules:

MINUS(pos(z0), neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(pos(z0), minus_nat(s(0), x1))), pos(z0), neg(x1))
MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(pos(mod_nat(x1, s(s(0)))), pos(0)), pos(x1), pos(s(x1))))
MINUS(pos(z0), neg(s(x1))) → MINUSNAT(and(false, equal_int(pos(z0), minus_nat(0, x1))), pos(z0), neg(s(x1)))
MINUS(pos(z0), neg(0)) → MINUSNAT(and(true, equal_int(pos(z0), pos(s(0)))), pos(z0), neg(0))
MINUS(pos(s(x0)), pos(x1)) → MINUSNAT(and(true, equal_int(pos(x0), pos(x1))), pos(s(x0)), pos(x1))

The TRS R consists of the following rules:

equal_int(pos(0), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
and(true, false) → false
and(true, true) → true
equal_int(pos(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
and(false, false) → false
and(false, true) → false
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if(false, u, v) → v
if(true, u, v) → u
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
By instantiating [LPAR04] the rule MINUSNAT(true, pos(x1), y1) → MINUS(pos(x1), if(equal_int(pos(mod_nat(x1, s(s(0)))), pos(0)), pos(x1), pos(s(x1)))) we obtained the following new rules [LPAR04]:

MINUSNAT(true, pos(z0), neg(s(z1))) → MINUS(pos(z0), if(equal_int(pos(mod_nat(z0, s(s(0)))), pos(0)), pos(z0), pos(s(z0))))
MINUSNAT(true, pos(z0), neg(z1)) → MINUS(pos(z0), if(equal_int(pos(mod_nat(z0, s(s(0)))), pos(0)), pos(z0), pos(s(z0))))
MINUSNAT(true, pos(s(z0)), pos(z1)) → MINUS(pos(s(z0)), if(equal_int(pos(mod_nat(s(z0), s(s(0)))), pos(0)), pos(s(z0)), pos(s(s(z0)))))
MINUSNAT(true, pos(z0), neg(0)) → MINUS(pos(z0), if(equal_int(pos(mod_nat(z0, s(s(0)))), pos(0)), pos(z0), pos(s(z0))))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ UsableRulesProof
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ UsableRulesProof
                                                                                          ↳ QDP
                                                                                            ↳ Rewriting
                                                                                              ↳ QDP
                                                                                                ↳ UsableRulesProof
                                                                                                  ↳ QDP
                                                                                                    ↳ QReductionProof
                                                                                                      ↳ QDP
                                                                                                        ↳ Rewriting
                                                                                                          ↳ QDP
                                                                                                            ↳ UsableRulesProof
                                                                                                              ↳ QDP
                                                                                                                ↳ QReductionProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Rewriting
                                                                                                                      ↳ QDP
                                                                                                                        ↳ UsableRulesProof
                                                                                                                          ↳ QDP
                                                                                                                            ↳ Rewriting
                                                                                                                              ↳ QDP
                                                                                                                                ↳ UsableRulesProof
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ QReductionProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Instantiation
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ Instantiation
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Instantiation
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ Narrowing
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ DependencyGraphProof
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ Instantiation
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ AND
                                                                                                                                                                        ↳ QDP
                                                                                                                                                                        ↳ QDP
                                                                                                                                                                          ↳ UsableRulesProof
                                                                                                                                                                            ↳ QDP
                                                                                                                                                                              ↳ Instantiation
QDP
                                                                                                                                                                                  ↳ Rewriting

Q DP problem:
The TRS P consists of the following rules:

MINUS(pos(z0), neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(pos(z0), minus_nat(s(0), x1))), pos(z0), neg(x1))
MINUS(pos(z0), neg(s(x1))) → MINUSNAT(and(false, equal_int(pos(z0), minus_nat(0, x1))), pos(z0), neg(s(x1)))
MINUS(pos(z0), neg(0)) → MINUSNAT(and(true, equal_int(pos(z0), pos(s(0)))), pos(z0), neg(0))
MINUS(pos(s(x0)), pos(x1)) → MINUSNAT(and(true, equal_int(pos(x0), pos(x1))), pos(s(x0)), pos(x1))
MINUSNAT(true, pos(z0), neg(s(z1))) → MINUS(pos(z0), if(equal_int(pos(mod_nat(z0, s(s(0)))), pos(0)), pos(z0), pos(s(z0))))
MINUSNAT(true, pos(z0), neg(z1)) → MINUS(pos(z0), if(equal_int(pos(mod_nat(z0, s(s(0)))), pos(0)), pos(z0), pos(s(z0))))
MINUSNAT(true, pos(s(z0)), pos(z1)) → MINUS(pos(s(z0)), if(equal_int(pos(mod_nat(s(z0), s(s(0)))), pos(0)), pos(s(z0)), pos(s(s(z0)))))
MINUSNAT(true, pos(z0), neg(0)) → MINUS(pos(z0), if(equal_int(pos(mod_nat(z0, s(s(0)))), pos(0)), pos(z0), pos(s(z0))))

The TRS R consists of the following rules:

equal_int(pos(0), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
and(true, false) → false
and(true, true) → true
equal_int(pos(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
and(false, false) → false
and(false, true) → false
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if(false, u, v) → v
if(true, u, v) → u
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
By rewriting [LPAR04] the rule MINUSNAT(true, pos(s(z0)), pos(z1)) → MINUS(pos(s(z0)), if(equal_int(pos(mod_nat(s(z0), s(s(0)))), pos(0)), pos(s(z0)), pos(s(s(z0))))) at position [1,0,0,0] we obtained the following new rules [LPAR04]:

MINUSNAT(true, pos(s(z0)), pos(z1)) → MINUS(pos(s(z0)), if(equal_int(pos(if1(greatereq_int(pos(z0), pos(s(0))), mod_nat(minus_nat_s(z0, s(0)), s(s(0))), s(z0))), pos(0)), pos(s(z0)), pos(s(s(z0)))))



↳ ITRS
  ↳ ITRStoQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Rewriting
                          ↳ QDP
                            ↳ UsableRulesProof
                              ↳ QDP
                                ↳ QReductionProof
                                  ↳ QDP
                                    ↳ RemovalProof
                                    ↳ RemovalProof
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ Rewriting
                                          ↳ QDP
                                            ↳ Rewriting
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Rewriting
                                                      ↳ QDP
                                                        ↳ Rewriting
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ Rewriting
                                                                              ↳ QDP
                                                                                ↳ UsableRulesProof
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ UsableRulesProof
                                                                                          ↳ QDP
                                                                                            ↳ Rewriting
                                                                                              ↳ QDP
                                                                                                ↳ UsableRulesProof
                                                                                                  ↳ QDP
                                                                                                    ↳ QReductionProof
                                                                                                      ↳ QDP
                                                                                                        ↳ Rewriting
                                                                                                          ↳ QDP
                                                                                                            ↳ UsableRulesProof
                                                                                                              ↳ QDP
                                                                                                                ↳ QReductionProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Rewriting
                                                                                                                      ↳ QDP
                                                                                                                        ↳ UsableRulesProof
                                                                                                                          ↳ QDP
                                                                                                                            ↳ Rewriting
                                                                                                                              ↳ QDP
                                                                                                                                ↳ UsableRulesProof
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ QReductionProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Instantiation
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ Instantiation
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Instantiation
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ Narrowing
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ DependencyGraphProof
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ Instantiation
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ AND
                                                                                                                                                                        ↳ QDP
                                                                                                                                                                        ↳ QDP
                                                                                                                                                                          ↳ UsableRulesProof
                                                                                                                                                                            ↳ QDP
                                                                                                                                                                              ↳ Instantiation
                                                                                                                                                                                ↳ QDP
                                                                                                                                                                                  ↳ Rewriting
QDP

Q DP problem:
The TRS P consists of the following rules:

MINUS(pos(z0), neg(x1)) → MINUSNAT(and(greatereq_int(neg(x1), pos(0)), equal_int(pos(z0), minus_nat(s(0), x1))), pos(z0), neg(x1))
MINUS(pos(z0), neg(s(x1))) → MINUSNAT(and(false, equal_int(pos(z0), minus_nat(0, x1))), pos(z0), neg(s(x1)))
MINUS(pos(z0), neg(0)) → MINUSNAT(and(true, equal_int(pos(z0), pos(s(0)))), pos(z0), neg(0))
MINUS(pos(s(x0)), pos(x1)) → MINUSNAT(and(true, equal_int(pos(x0), pos(x1))), pos(s(x0)), pos(x1))
MINUSNAT(true, pos(z0), neg(s(z1))) → MINUS(pos(z0), if(equal_int(pos(mod_nat(z0, s(s(0)))), pos(0)), pos(z0), pos(s(z0))))
MINUSNAT(true, pos(z0), neg(z1)) → MINUS(pos(z0), if(equal_int(pos(mod_nat(z0, s(s(0)))), pos(0)), pos(z0), pos(s(z0))))
MINUSNAT(true, pos(z0), neg(0)) → MINUS(pos(z0), if(equal_int(pos(mod_nat(z0, s(s(0)))), pos(0)), pos(z0), pos(s(z0))))
MINUSNAT(true, pos(s(z0)), pos(z1)) → MINUS(pos(s(z0)), if(equal_int(pos(if1(greatereq_int(pos(z0), pos(s(0))), mod_nat(minus_nat_s(z0, s(0)), s(s(0))), s(z0))), pos(0)), pos(s(z0)), pos(s(s(z0)))))

The TRS R consists of the following rules:

equal_int(pos(0), pos(s(y))) → false
equal_int(pos(s(x)), pos(s(y))) → equal_int(pos(x), pos(y))
and(true, false) → false
and(true, true) → true
equal_int(pos(0), pos(0)) → true
equal_int(pos(s(x)), pos(0)) → false
greatereq_int(neg(0), pos(0)) → true
greatereq_int(neg(s(x)), pos(0)) → false
minus_nat(s(x), 0) → pos(s(x))
minus_nat(s(x), s(y)) → minus_nat(x, y)
equal_int(pos(0), neg(0)) → true
equal_int(pos(0), neg(s(y))) → false
equal_int(pos(s(x)), neg(0)) → false
equal_int(pos(s(x)), neg(s(y))) → false
and(false, false) → false
and(false, true) → false
minus_nat(0, 0) → pos(0)
minus_nat(0, s(y)) → neg(s(y))
mod_nat(0, s(x)) → 0
mod_nat(s(x), s(y)) → if1(greatereq_int(pos(x), pos(y)), mod_nat(minus_nat_s(x, y), s(y)), s(x))
if(false, u, v) → v
if(true, u, v) → u
greatereq_int(pos(x), pos(0)) → true
greatereq_int(pos(0), pos(s(y))) → false
greatereq_int(pos(s(x)), pos(s(y))) → greatereq_int(pos(x), pos(y))
minus_nat_s(x, 0) → x
minus_nat_s(0, s(y)) → 0
minus_nat_s(s(x), s(y)) → minus_nat_s(x, y)
if1(true, x, y) → x
if1(false, x, y) → y

The set Q consists of the following terms:

if(false, x0, x1)
if(true, x0, x1)
and(false, false)
and(false, true)
and(true, false)
and(true, true)
greatereq_int(pos(x0), pos(0))
greatereq_int(neg(0), pos(0))
greatereq_int(neg(0), neg(x0))
greatereq_int(pos(x0), neg(x1))
greatereq_int(pos(0), pos(s(x0)))
greatereq_int(neg(x0), pos(s(x1)))
greatereq_int(neg(s(x0)), pos(0))
greatereq_int(neg(s(x0)), neg(0))
greatereq_int(pos(s(x0)), pos(s(x1)))
greatereq_int(neg(s(x0)), neg(s(x1)))
equal_int(pos(0), pos(0))
equal_int(neg(0), pos(0))
equal_int(neg(0), neg(0))
equal_int(pos(0), neg(0))
equal_int(pos(0), pos(s(x0)))
equal_int(neg(0), pos(s(x0)))
equal_int(pos(0), neg(s(x0)))
equal_int(neg(0), neg(s(x0)))
equal_int(pos(s(x0)), pos(0))
equal_int(pos(s(x0)), neg(0))
equal_int(neg(s(x0)), pos(0))
equal_int(neg(s(x0)), neg(0))
equal_int(pos(s(x0)), neg(s(x1)))
equal_int(neg(s(x0)), pos(s(x1)))
equal_int(pos(s(x0)), pos(s(x1)))
equal_int(neg(s(x0)), neg(s(x1)))
minus_nat(0, 0)
minus_nat(0, s(x0))
minus_nat(s(x0), 0)
minus_nat(s(x0), s(x1))
mod_nat(0, s(x0))
mod_nat(s(x0), s(x1))
if1(true, x0, x1)
if1(false, x0, x1)
minus_nat_s(x0, 0)
minus_nat_s(0, s(x0))
minus_nat_s(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.